I'm using MySQL query "SELECT * FROM ..."
And a while loop:
$rtnjsonobj = array();
while ($k = @mysql_fetch_array($tmp)) {
$rtnjsonobj['status'] = $k['status'];
$rtnjsonobj['text'] = $k['text'];
$data[] = $rtnjsonobj;
}
I need to count all the values in this array that have status == 1.
How can I do that?
mysqlextension, butmysqliinstead.mysqlis deprecated by PHP.