$result = mysql_query("SELECT token FROM active_users");
$tokens = array();
while($row = mysql_fetch_assoc($result))
{
$tokens[] = $row;
}
...有效,但是:
Array
(
[0] => Array
(
[token] => 32166565
)
[1] => Array
(
[token] => 56566565
)
)
而我需要它简单:
Array
(
[0] => 32166565
[1] => 56566565
)
最佳答案
试试这个
$token[] = $row['token'];
关于mysql - 将 MySQL 行值存储为数组值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10788658/