How can i get every row of a mysql table and put it in a php array? Do i need a multidimensional array for this? The purpose of all this is to display some points on a google ma
$sql = "SELECT field1, field2, field3, .... FROM sometable"; $result = mysql_query($sql) or die(mysql_error()); $array = array(); while($row = mysql_fetch_assoc($result)) { $array[] = $row; } echo $array[1]['field2']; // display field2 value from 2nd row of result set.