title: Loop through array and echo an array value by using the array key as a variable?
body: <p>I was wondering if its possible, to loop through an array but have each key as a variable?</p>
  
  <p>My current code is below, with an example expected output:</p>
  
  <pre><code>&lt;?php
  
     $arr = array(array('id' =&gt; 24, 'name' =&gt; 'luigi'), array('id' =&gt; 12, 'name' =&gt; 'luiginsd'));
  
     foreach ($arr as $value) {
  
        echo $id . '&lt;br /&gt;';
  
     }
  
  /*
  
  which would output:
  
  24&lt;br /&gt;
  12&lt;br /&gt;
  
  */
  
  ?&gt;
  </code></pre>
  
  <p>All help is appreciated.</p>