I am trying to build a function that extracts information from a database and inserts it into an associative array in PHP using mysql_fetch_assoc, and return the ar
mysql_fetch_assoc
Assuming you've made the call, and got $result back:
$array = new array(); while($row = mysql_fetch_assoc($result)){ $array[] = $row; } return $array;