'; if (isset($_GET['year'])) $year=$_GET['year']; if (isset($_POST['year'])) $year=$_POST['year']; $startswith=''; if (isset($_GET['startswith'])) $startswith=urldecode($_GET['startswith']); if (isset($_POST['startswith'])) $startswith=urldecode($_POST['startswith']); $url="http://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php?title=Population%20by%20World%20Country%20" . $startswith . "%20for%20year%20" . $year . "&onclick=y&task=Population&desc=Population&data="; while (strpos($pagecontent, "', '', $entries[$i]))[0], '*' . $startswith) !== false || strpos('*' . $pentries[$zero], '*' . $startswith) !== false) { //echo $entries[$i]; //echo explode("<", str_replace('">', '', $entries[$i]))[0]; //exit; //echo $entries[$i] . "\n" . $ddelim . "\n" . $pentries[0] . " is 0\n"; //echo $pentries[1] . " is 1\n"; //echo $pentries[2] . " is 2\n"; //echo $pentries[3]; //exit; if ($idelim == "Population, tot") { $poplist.=$popdelim . "[~" . str_replace("%27","",str_replace(".","",str_replace("+","%20",urlencode($pentries[$zero])))) . "~," . str_replace("decimal","0",$pentries[$one]) . "]"; } else { $poplist.=$popdelim . "[~" . str_replace("%27","",str_replace(".","",str_replace("+","%20",explode('"', explode($cdelim, str_replace('">', '', urlencode($entries[$i])))[$zero])[0]))) . "~," . str_replace("decimal","0",explode($cdelim, $pentries[$one])[0]) . "]"; } $popdelim=",%20"; } else { if ($idelim == "Population, tot") { $othercnt+=str_replace("decimal","0",$pentries[$one]); } else { $othercnt+=str_replace("decimal","0",explode($cdelim, $pentries[$one])[0]); } } } } $pagecontent=" 0 && !isset($_GET['justletters']) && !isset($_POST['justletters'])) { $url.=$poplist . $popdelim . "[~Non-" . $startswith . "~," . $othercnt . "]"; } else { $url.=$poplist; } echo "World Bank API Population Data Google Chart Pie Chart - RJM Programming - February, 2016 var url='" . explode("&data=",$url)[1] . "'; function preiframeviaurl() { if (document.getElementById('data').value != '') url=document.getElementById('data').value; return true; } function iframeviaurl() { if (parent.document.getElementById('childiframe')) { document.body.style.backgroundColor='lightblue'; } if (('" . explode("&data=",$url)[0] . "&data=' + url).length > 750) { //alert(':' + url); document.getElementById('myiframe').style.display='block'; document.getElementById('data').value=decodeURIComponent(url); document.getElementById('mysubmit').click(); } else if (url != '') { //alert('" . explode("&data=",$url)[0] . "&data=' + url); document.getElementById('myiframe').style.display='block'; document.getElementById('myiframe').src='" . explode("&data=",$url)[0] . "&data=' + url; } return true; }

World Bank API Population Data Google Chart Pie Chart

RJM Programming

Thanks to World Bank API

"; ?>