View Single Post
Old 06-13-2007, 11:35 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,486
sde is on a distinguished road
read the comments

PHP Code:
// your query
$result mysql_query("select * from Birds");

// use mysql_fetch_array to get a numerically indexed array
while ($array mysql_fetch_array($result)) {
  echo 
$array[0] . '<br />';
}

// alternatively, you could use mysql_fetch_assoc if you wanted
// the array to be keyed by the field name
while ($array mysql_fetch_assoc($result)) {
  echo 
$array['Name'] . '<br />';

__________________
Mike
sde is offline   Reply With Quote