Quote:
Originally posted by DesertWolf
Well to start with your array structure is wrong and when you echo output you are getting "array" because you are not calling out the elements of the array.
Try this:
<?php
$crew = array(
"Name" =>"Ilya",
"age"=>13,
"location"=>"San Diego, Ca"
);
for ($n=0;$n<count($crew); $n++) {
$Line = each ($crew);
print ("$Line[key] : $Line[value].<P.\n");
}
?>
I'm not sure if that is perfect I haven't messed with PHP very much, but if you plan on printing out more that one persons info you should look at using an array for names, ages and locations.
|
BTW, you dont need quotes around Name and Age and location, you only need quotes for two or more words...
Ilya