Php/mysql fetch all rows in array?

How can i fetch all the rows in an array…
When i use mysql_fetch_array it will only give me the latest, or i need to loop it is there anyway i can retrieve all the results at once?

Try using mysql_query like so:

   $sql = "SELECT * FROM members WHERE name LIKE 'jim'";
/* If the query is valid $result will now
 * hold an indexed array of data */
   $result = mysql_query($sql);
/* mysql_fetch_assoc will give you each row as
 * $row['column_name'] */
  while ($row = mysql_fetch_assoc($result)) {
       echo $row['name'];

Swap out the dummy table name and value with your real values and see what you get. If not, try posting some of your code. It’s only guesswork otherwise.