title: facebook search api json decode in php
body: <p>I am trying to search the facebook api for keywords, which I can do successfully, however the results returned are in a json array and I need to decode the individual post and extract data from that. This is the code I am using to search the api:</p>
  
  <pre><code>$q = "xxxx"; // dont need to urlencode the string
  $q = str_replace(" ","+",$q); 
  $search = $facebook-&gt;api('/search?q='.$q.'&amp;type=post&amp;limit=500');
  </code></pre>
  
  <p>If I was just hitting a URL I would use the json_decode function of PHP but I cant use it in this instance, can anyone point me in the right direction?</p>