title: JSON - Importing Data Using FileGetContents not showing?
body: <p>I've been writing a little script to get monthly views for a user. When i've got the access token of the user and i var_dump the file_get_contents($url) i get a correct-json, which looks like this.</p>
  
  <pre><code>$views = file_get_contents('https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DMINE&amp;start-date=2014-09-29&amp;end-date=2014-10-29&amp;metrics=views&amp;access_token='.$responseObj-&gt;access_token);
  var_dump($views);
  </code></pre>
  
  <p>The result being:</p>
  
  <pre><code>{
    "kind": "youtubeAnalytics#resultTable",
    "columnHeaders": [
      {
        "name": string,
        "dataType": string,
        "columnType": string
      },
    ],
    "rows": [
      [
        2204
      ]
    ]
  }
  </code></pre>
  
  <p>I'm unsure how to use JSON to import this number "2204" and echo it out. Currently i'm trying:</p>
  
  <pre><code>$monthlyViews = $views['rows'][0];
  var_dump($monthlyViews)
  </code></pre>
  
  <p>But this isn't working and i'm not sure why. I'm getting nothing responded except an error saying:</p>
  
  <p>Fatal error: Cannot use string offset as an array in /home/a1059253/public_html/oauth/callback.php on line 39</p>