I have data inside a mysql database, say, a list of names.
I want to pull this data out and put it into an php array.
I am not sure what I am doing wrong but it is not working.
$db = mysql_connect("host", "sn", "pw");
mysql_select_db("table",$db);
$sql = "SELECT * FROM Name";
$result = mysql_query($sql,$db);
$nameX=array("BOB");
while ($myrow = mysql_fetch_array($result)) {
$name= array_push($nameX,$myrow["Name"]);
}
This should be working but is not. Any suggestions?