title: Google Analytics PHP API (GAPI) - Getting number of page views
body: <p>been working on this for two days now and seem to be getting nowhere.</p>
  
  <p>I am using the GAPI Google analytics PHP class. This is the current code I have the now:</p>
  
  <pre><code>$ga-&gt;requestReportData("[UID]",array('day'),array('visits'), array("day"));
  </code></pre>
  
  <p>What I want to do is get the number of "pageviews" from the "past 7 days". So output would be something like:</p>
  
  <pre><code>&lt;?php foreach($ga-&gt;getResults() as $result) { ?&gt;
      Date: &lt;?php echo $result; ?&gt;
      Page Views: &lt;?php echo $result-&gt;getPageviews(); ?&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>I am new to Google analytics API so not sure where to start. Thanks for any help!</p>