I am wondering if there a function in php that can allow me put all my selected data in an array .Currently i am using mysql_fetch_array and as i have read in the manual,that function won’t fetch every record in the table.
$result = mysql_query("SELECT * FROM $tableName");
$array = mysql_fetch_array($result);
echo json_encode($array);
I would suggest the use of MySQLi or MySQL PDO for performance and security purposes, but to answer the question:
If you switched to MySQLi you could do: