I use this to get a column named "device_token" and save the values to an array:
mysql_connect("localhost", "xxxx", "xxxx") or die ("Not connected");
mysql_select_db("xxxxx") or die ("no database");
$query = "SELECT xxxx_device_token FROM device_tokens";
$result_array = array();
while($row = mysql_fetch_assoc($result))
{
$result_array[] = $row['xxxx_device_token'];
}
print_r($result_array);
But all I get is an empty array, what is the problem ?
$result = mysql_query($query).