Thread: wierd output
View Single Post
Old 01-10-2003, 07:01 PM   #3 (permalink)
DesertWolf
Non-profit Techie
 
DesertWolf's Avatar
 
Join Date: Dec 2002
Location: Mesa AZ
Posts: 76
DesertWolf is on a distinguished road
Send a message via AIM to 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.
DesertWolf is offline   Reply With Quote