title: foreach access the index or an associative array
body: <p>I have the following code snippet.</p>
  
  <pre><code>$items['A'] = "Test";
  $items['B'] = "Test";
  $items['C'] = "Test";
  $items['D'] = "Test";
  
  $index = 0;
  foreach($items as $key =&gt; $value)
  {
      echo "$index is a $key containing $value\n";
      $index++;
  }
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>0 is a A containing Test
  1 is a B containing Test
  2 is a C containing Test
  3 is a D containing Test
  </code></pre>
  
  <p>Is there a  way to leave out the <code>$index</code> variable?</p>