I typically query my database like :
$result = mysql_query($query, $conn . . . . );
Then, if I know only one record is coming back, I use:
$row = mysql_fetch_array($result);
The creates an array called $row. The problem is, there is no way to iterate thru this array. In order to extract the data from the array, you must use the exact field name to do this :
$my_var = $row['FirstName'];
$my_var now contains the value of the record for the field "FirstName".
Does anybody know how to iterate thru this array? This does not work :
$my_var = $row[0]; // returns a 0
Or perhaps, there is a better function to use than mysql_fetch_array (which in not even documented in the on-line manual)?
Thanks in advance.