title: Filtering out with PHP from an array containing pdo/sql fetched results
body: <p>I am fetching all results from a PDO query like this:</p>
  
  <pre><code>$orders = $ordersQuery-&gt;fetchAll(PDO::FETCH_ASSOC);
  </code></pre>
  
  <p>Now, I would like to count how many rows there are where the field 'status' is equal to 'OPEN'. I know I could just build my SQL directly to load only the OPEN status rows, but I thought it might be faster using PHP with something like </p>
  
  <pre><code>$openOrders = count(array_keys($orders,"OPEN"));
  </code></pre>
  
  <p>It is returning 0 though.</p>