查询是: SELECT状态,COUNT(*)totalCount FROM clients GROUP BY状态
之后的
while ($row = mysqli_fetch_assoc($total) ) {
echo "<pre>";
var_dump($row);
echo "</pre>";}
输出状态列中不同值的出现次数:
array(2) {
["status"]=>
string(6) "start"
["totalCount"]=>
string(1) "1"
}
array(2) {
["status"]=>
string(4) "middle"
["totalCount"]=>
string(3) "151"
}
array(2) {
["status"]=>
string(7) "end"
["totalCount"]=>
string(2) "17"
}
问题是我如何访问说,只有 [“status”] =&gt;“中间”键和带回声的数组值?
非常感谢
答案 0 :(得分:0)