title: JSON Parsing with PHP
body: <p>I have the following JSON content that I'm pulling from a service feed:</p>
  
  <pre><code>[
     {
        "global_event":{
           "ending_at":"2011-11-07T02:00:00Z",
           "short_url":"http://bit.ly/reAhRw",
           "created_at":"2011-10-04T14:25:41Z",
           "event_responses":[
  
           ],
           "addresses":{
              "location":{
                 "city":"blah",
                 "latitude":30.205288,
                 "zipcode":"343434",
                 "street":"blah",
                 "longitude":-95.475289,
                 "state":"TX"
              }
           },
           "body":"blahblahblah",
           "euid":"2f489d0c82d167f1c16aba5d3b4c29ade6f1d52a",
           "title":"Fusion",
           "updated_at":"2011-10-04T14:26:57Z",
           "event_roles":[
  
           ],
           "user":{
              "long_name":"Fusion Single",
              "nickname":""
           },
           "event_items":[
  
           ],
           "starting_at":"2011-11-07T00:00:00Z"
        }
     }
  ]
  </code></pre>
  
  <p>I've tried the following code to parse it to no avail:</p>
  
  <pre><code>$json = @file_get_contents('jsonfeed');
  $feed = json_decode($json);
  
  foreach($feed-&gt;global_event as $item) {
              $rss_item = array(
                  'title' =&gt; $item-&gt;title,
                  'link' =&gt; $item-&gt;short_url,
                  'author' =&gt; $item-&gt;long_name,
                  'content' =&gt; $item-&gt;body,
                  'date' =&gt; $item-&gt;updated_at,
                  'type' =&gt; 'Woodlands Church'
              );
              array_push($this-&gt;rss, $rss_item);  
          }
  </code></pre>
  
  <p>The final array that is created <code>$this-&gt;rss</code> never has anything in it and is just a null array.  Any ideas?</p>