Strange .. Result..
Posted: Sat Aug 09, 2003 9:59 am
Hi guys, I'm just messing around with this code..
And the result is :
The rest of it outside the code
are just html tags.
Thanks,
Andrew

Code: Select all
<?
$fruits = array("Apple" => "Red", "Mango" => "Green", "Lemon" => "Yellow", "Durian" => "Green");
$fruitsї"Dragon Fruit"] = "Pink";
reset($fruits);
while (list ($key, $value) = each($fruits)) {
echo "Color of $key is $value <br>";
echo "Color of " . key($fruits) . " is " . current($fruits) . "<br>";
}- Color of Apple is Red
Color of Mango is Green
Color of Mango is Green
Color of Lemon is Yellow
Color of Lemon is Yellow
Color of Durian is Green
Color of Durian is Green
Color of Dragon Fruit is Pink
Color of Dragon Fruit is Pink
Color of is
The rest of it outside the code
are just html tags.
Thanks,
Andrew