According to your explanation...
// Now mysql result set is stored in php variable.
$result = mysql_query("SELECT * FROM foo");
Or if you meant that you want the rows as an array. Then you need to loop through the result set.
$array = array();
while($row = mysql_fetch_object($result))
$array = $row;
Or you mean something else...? I am confused..