0) { $trclass="odd"; $json_output = json_decode(str_replace("$@$", "", str_replace("}]}]}]", "}]}]}", str_replace("$@$[","", ("$@$" . $pageContent))))); // ,true); $hstuff = str_replace("none;", "block;", str_replace(">", ">   " . $selname . "     ", $uc)); for ($i=0; $ilfs); $i++) { if (strpos($hstuff, '>' . $json_output->lfs[$i]->lf . 'lfs[$i]->lf) == strtoupper($biarray[$ii])) $done = "Y"; } } // title='" + sizeof($json_output->lfs[$i]->vars) + "' $subhstuff=""; $shs=""; if ($json_output->lfs[$i]->vars) { for ($iij=0; $iijlfs[$i]->vars); $iij++) { if ($subhstuff == "") { $subhstuff="
"; $shs="[object Object]"; } else { $shs.=",[object Object]"; } $subhstuff=str_replace("", "" . ($iij + 1) . "" . $json_output->lfs[$i]->vars[$iij]->lf . "" . $json_output->lfs[$i]->vars[$iij]->freq . "" . $json_output->lfs[$i]->vars[$iij]->since . "", $subhstuff); } if ($fillin == "") { $fillin=" setTimeout(alat, 5000); \n } \n function alat() { \n var dai=document.getElementsByTagName('table'); " . "\n"; } $fillin.=" dai[0].innerHTML=dai[0].innerHTML.replace(/" . '\"' . "/g,'').replace(\"" . $shs . "\", \"" . str_replace("
", "", $subhstuff) . "\"); " . "\n"; } $hstuff = str_replace("", "" . ($i + 1) . ".
" . sizeof($json_output->lfs[$i]->vars) . "" . str_replace(" class=\"thlink\"", "", str_replace(" class=thlink", "", str_replace("", "", $subhstuff)))) . "
" . $json_output->lfs[$i]->lf . "" . $json_output->lfs[$i]->freq . "" . $json_output->lfs[$i]->since . "", $hstuff); if ($trclass == "odd") { $trclass = "even"; } else { $trclass = "odd"; } } $ij = 1 + $i; } if ($appml) { $mytitle=$selname; //$pageContent=' {"records":[{"CustomerName":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"},{"CustomerName":"Ana Trujillo Emparedados y helados","City":"México D.F.","Country":"Mexico"},{"CustomerName":"Antonio Moreno Taquería","City":"México D.F.","Country":"Mexico"},{"CustomerName":"Around the Horn","City":"London","Country":"UK"},{"CustomerName":"Bs Beverages","City":"London","Country":"UK"},{"CustomerName":"Berglunds snabbköp","City":"Luleå","Country":"Sweden"},{"CustomerName":"Blauer See Delikatessen","City":"Mannheim","Country":"Germany"},{"CustomerName":"Blondel père et fils","City":"Strasbourg","Country":"France"},{"CustomerName":"Bólido Comidas preparadas","City":"Madrid","Country":"Spain"},{"CustomerName":"Bon app","City":"Marseille","Country":"France"},{"CustomerName":"Bottom-Dollar Marketse","City":"Tsawassen","Country":"Canada"},{"CustomerName":"Cactus Comidas para llevar","City":"Buenos Aires","Country":"Argentina"},{"CustomerName":"Centro comercial Moctezuma","City":"México D.F.","Country":"Mexico"},{"CustomerName":"Chop-suey Chinese","City":"Bern","Country":"Switzerland"},{"CustomerName":"Comércio Mineiro","City":"São Paulo","Country":"Brazil"}]}'; //$pageContent=' {"sf": "BHP", "lfs": [{"lf": "benign prostatic hyperplasia", "freq": 12, "since": 1992, "vars": [{"lf": "benign prostatic hyperplasia", "freq": 8, "since": 1992}, {"lf": "Human benign hyperplastic prostate", "freq": 2, "since": 1994}, {"lf": "Benign prostatic hyperplasia", "freq": 1, "since": 1995}, {"lf": "benign prostate hyperplasia", "freq": 1, "since": 1995}]}, {"lf": "tert-butyl hydroperoxide", "freq": 11, "since": 1986, "vars": [{"lf": "tert-butyl hydroperoxide", "freq": 6, "since": 1994}, {"lf": "t-butyl hydroperoxide", "freq": 3, "since": 1986}, {"lf": "Tert-butyl hydroperoxide", "freq": 1, "since": 1993}, {"lf": "tert.-butyl hydroperoxide", "freq": 1, "since": 2003}]}, {"lf": "N-nitrosobis (2-hydroxypropyl) amine", "freq": 7, "since": 1985, "vars": [{"lf": "N-nitrosobis (2-hydroxypropyl) amine", "freq": 6, "since": 1985}, {"lf": "N-Nitrosobis (2-hydroxypropyl) amine", "freq": 1, "since": 1993}]}, {"lf": "benign hypertrophy of the prostate", "freq": 6, "since": 1988, "vars": [{"lf": "benign hypertrophy of the prostate", "freq": 4, "since": 1988}, {"lf": "Benign hypertrophy of the prostate", "freq": 2, "since": 2003}]}]}'; //$pageContent=' {"records":[{"lf": "benign prostatic hyperplasia", "freq": 12, "since": 1992}, {"lf": "tert-butyl hydroperoxide", "freq": 11, "since": 1986}, {"lf": "N-nitrosobis (2-hydroxypropyl) amine", "freq": 7, "since": 1985}, {"lf": "benign hypertrophy of the prostate", "freq": 6, "since": 1988}]}'; //file_put_contents("x.x", $fillin); //$fillin=""; $aml=" " . $mytitle . "

" . $mytitle . "

Thanks to W3Schools

Meaning Frequency Since Subs
{{lf}} {{freq}} {{since}} {{vars}}
^
"; //file_put_contents("qpc.qqq", $aml); echo $aml; exit; } if ($done == "n") { $hstuff = str_replace("", "" . ($ij + 1) . "" . $sparelf . "" . $sparef . "" . $spares . "", $hstuff); } echo $hstuff; // we've done the parsing work } else if ($selname == strtoupper($selname)) { echo $pageContent; // parent does the parsing work } else { $json_output = json_decode(str_replace("$@$", "", str_replace("}]}]}]", "}]}]}", str_replace("$@$[","", ("$@$" . $pageContent))))); // ,true); $hstuff = "\n\n\n"; echo $hstuff; // we've done the parsing work } } ?>