title: Variable variables concept confusion
body: <p>Hey guys am a newbie in PHP. I have seen some code like:</p>
  
  <pre><code>&lt;?php
  class foo {
      var $bar = 'I am bar.';
      var $arr = array('I am A.', 'I am B.', 'I am C.');
      var $r = 'some';
  }
  
  $foo = new foo();
  $arr = 'arr';
  echo $foo-&gt;$arr[1];
  ?&gt;
  </code></pre>
  
  <p>It returns <code>some</code>. Why it is returning <code>some</code>. <code>echo $foo-&gt;$arr[1]</code> means it should output <code>I am B</code>. But instead it outputs <code>some</code>; why?</p>