Newbee... i have some code that creates a foreach loop in php which works but how could i replace the names and ages from a sql database?
I am having some problems finding a good example online.
Any help appreciated or let me know any good tutorials on this.
My code is below,
$names_ages = array ( "bob" => "bob is 20", "sam" => "sam is 45");
foreach ($names_ages as $name => $age)
echo "$name : $age<br>";