Lots of Legos

Posted at: 2:10 pm by Timothy Haroutunian
Categories: Rants and Randomness

< ?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.census.gov/ipc/www/world.html");
ob_start();
$data = curl_exec($ch);
$string = ob_get_contents();
ob_get_clean();
list(,$second) = explode('World ‘, $string);
list($first) = explode(‘
‘, $second);
$world_pop = explode(“,”, $first);
$world_population = strip_tags(implode($world_pop));
$world_population = number_format($world_population * 30);

echo “\"legos\"

After talking with Dan, he informed me of a statistic that he found in a book and I thought it was very interesting. Every person in the World would need to possess 30 Lego’s each to make up all of the Lego’s that were made all time.

Since we live in a Dynamic world and the World Population is always changing, I thought I would create a Dynamic Number that corresponds with the above statement.

“;

echo “Current Total Lego’s Created: “;
echo ““;
echo “$world_population”;
echo “
“;
?>

30 legos, dyamic world, legos, population, world population

Text Link Ads

Post A Comment

Leave a Comment