表users
-列nick
:
SKY
NIGHT
BLACK PAPER
GOLD LINE
$st = $db->query("select nick from users order by nick asc");
$st->execute();
$nicks = $st->fetchAll();
print_r($nicks);
结果:
Array ( [0] => Array ( [nick] => BLACK PAPER [0] => BLACK PAPER ) [1] => Array ( [nick] => GOLD LINE [0] => GOLD LINE ) [2] => Array ( [nick] => NIGHT [0] => NIGHT ) [3] => Array ( [nick] => SKY [0] => SKY ))
如何获得此结果:
Array("BLACK PAPER","GOLD LINE","NIGHT","SKY");