Hi.. I have started learning PHP only recently. But I stumbled upon a problem i can't understand, and i guess, it's one of the basics.. Probably solution is very simple but still couldn't figure it out...
I got this code:
<?php
//setup
$animals=array("fox","lion","bear");
//do someting
sort($animals);
print_r($animals);
//output
for ($x=0;$x<3;$x++)
{
echo "<br />"+$animals[0]+" is a creature.";
}
?>
Result:
Array ( [0] => bear [1] => fox [2] => lion ) 000
for some reason, it only returns zeros, not the sentence.. any help would be appreciated...