title: PHP Filter array by key value
body: <p>I'm trying to filter the array output of GET search/tweets (remove tweets with empty 'geo' key and keep the tweets with 'geo' key) by using this piece of code.</p>
  
  <pre><code>$data = (array) $cb-&gt;search_tweets($params); //copy of raw print_r array here: http://pastebin.com/b2BvwUuJ
  
  $filtered = array_filter($data, function($v) { 
  
      return $v['geo'] != 'false'; 
  
  });
  
  print_r($filtered);
  </code></pre>
  
  <p>It results in the following error code.</p>
  
  <blockquote>
    <p>Cannot use object of type stdClass as array in ...</p>
  </blockquote>
  
  <p>What am I doing wrong? </p>