Now I grab all the table data like this:
Code: Select all
<?php
$results=mysql_query("SELECT * FROM states");
$myArray=mysql_fetch_array($states);
?>I know that I can use this array in a loop to access all the data by rows using $myArray[abbr] and $myArray[full]. It seems that using mysql_fetch_array doesn't set the key=>value pairing as I thought it would.
Obviously, I'm missing something here, but I just don't know enough to spot it on my own. The two books I'm using to teach myself PHP have failed me this instance.
Anyone? Thanks in advance!