title: Get index position value in PHP array
body: <p>I'm confused on why in the following two code blocks, printing the <code>$arr</code> gives the same output but <code>$arr['type'][0]</code> does not. Notice the <code>r</code> in the 2nd code block output:</p>
  
  <pre><code>$arr=array('type'=&gt;' review');   
  print_r($arr);
  echo '&lt;br&gt;';
  print_r($arr['type'][0]);
  </code></pre>
  
  <hr>
  
  <pre><code>$arr['type']='review';   
  print_r($arr);
  echo '&lt;br&gt;';
  print_r($arr['type'][0]);
  </code></pre>
  
  <p><strong>OUTPUT</strong></p>
  
  <pre><code>Array ( [type] =&gt; review ) 
  </code></pre>
  
  <hr>
  
  <pre><code>Array ( [type] =&gt; review ) 
  r
  </code></pre>