title: Getting value with array
body: <p>I am struggling to get the value of an element in a particular array. I would like to get the value of the "logo" in this case to return "Logo Google 2013 Official.svg" from the code below. 
  Any help is greatly appreciated.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;html&gt;
  
  &lt;body&gt;
  &lt;h2&gt;Search&lt;/h2&gt;
  &lt;form method="post"&gt;
  Search: &lt;input type="text" name="q" value="google" /&gt;
  &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  
  &lt;?php
  
  if (isset($_POST['q'])) {
  $search = $_POST['q'];
  
  
  $url_2 = 
  "http://en.wikipedia.org/w/api.php?   
  action=query&amp;prop=revisions&amp;rvprop=content&amp;format=json&amp;titles=$search&amp;rvsection=0&amp;continue=";
  $res_2 = file_get_contents($url_2);
  $data_2 = json_decode($res_2);
  
  
  ?&gt;
  
  &lt;h2&gt;Search results for '&lt;?php echo $search; ?&gt;'&lt;/h2&gt;
  &lt;ol&gt;
  &lt;?php foreach ($data_2-&gt;query-&gt;pages as $r): 
  
  ?&gt;
  
  &lt;li&gt;
  
  &lt;?php foreach($r-&gt;revisions[0] as $a); 
  echo $a; ?&gt;
  
  &lt;/li&gt;
  &lt;?php endforeach; ?&gt;
  &lt;/ol&gt;
  
  &lt;?php 
  }
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The resulting <code>$url_2</code> is <a href="http://en.wikipedia.org/w/api.php?action=query&amp;prop=revisions&amp;rvprop=content&amp;format=json&amp;titles=google&amp;rvsection=0&amp;continue=" rel="nofollow">http://en.wikipedia.org/w/api.php?action=query&amp;prop=revisions&amp;rvprop=content&amp;format=json&amp;titles=google&amp;rvsection=0&amp;continue=</a></p>