title: Foreach through JSONArray in PHP
body: <p>I'm getting this error:</p>
  
  <blockquote>
    <p>Warning: Invalid argument supplied for foreach() in [page].php on line 49</p>
  </blockquote>
  
  <p>This is an echo of the $json variable:
  <code>[{"d":"2011-03-26","q":1,"t":1060},{"d":"2011-03-26","q":2,"t":1060},{"d":"2011-03-26","q":1,"t":1060}]</code></p>
  
  <p>And I'm trying to iterate through like so:</p>
  
  <pre><code>foreach($json as $obj) { // &lt;--THIS IS LINE 49
      // Stuff
  }
  </code></pre>