title: PHP json decode with number tag
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10333016/how-to-access-object-properties-with-names-like-integers">How to access object properties with names like integers?</a>  </p>
  </blockquote>
  
  
  
  <p>I tried to decode the json result from youtube data api by the following code:</p>
  
  <pre><code> $url="http://gdata.youtube.com/feeds/api/videos/$id?v=2&amp;alt=jsonc";
      echo "$url".'&lt;BR&gt;';
      $json = file_get_contents($url,0,null,null);
      $json_output = json_decode($json);
      $items=$json_output -&gt; data;
  
      $content = "{$items-&gt;content-&gt;1}";
      echo $content.'&lt;BR&gt;';
  </code></pre>
  
  <p>Everything works fine but the last two lines. Could someone please help?</p>
  
  <p>And Here is the json result:</p>
  
  <pre><code> {"apiVersion":"2.1","data":{"id":"9jDg3Dh28rE","uploaded":"2012-10-04T03:45:49.000Z",
  ........
   "content":{"5":"http://www.youtube.com/v/9jDg3Dh28rE?version=3&amp;f=videos&amp;app=youtube_gdata",
   "1":"rtsp://v5.cache8.c.youtube.com/CiILENy73wIaGQmx8nY43OAw9hMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp",
   "6":"rtsp://v5.cache4.c.youtube.com/CiILENy73wIaGQmx8nY43OAw9hMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"},"duration":2403,......}}
  </code></pre>