View Single Post
Old 07-31-2008, 09:34 PM   #7 (permalink)
Ross
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross is on a distinguished road
Default

Quote:
Originally Posted by Jako View Post
I ended up getting it, finally figured it out haha but thanks to all for your help.

After I built the array, I used the in_array() function to find the $id which is the age I was looking for to output my results.

thanks.
Were you only looking to get the age of person.id #23? IF so you're much better off doing something like this:

PHP Code:
$query mysql_query('SELECT * FROM `people` WHERE `id` = 23 LIMIT 1');

$person mysql_fetch_assoc($query);
// Get the data from this array as in the while loop - but you don't need one for this example

print_r($person); 
It's much more efficient and easier if you only need one person's results.
Ross is offline  
Reply With Quote