title: Confused about how to loop through subArray
body: <p>First of all I have searched for the similar threads  on  StackOverflow like <a href="https://stackoverflow.com/questions/36353541/loop-through-subarray-as-key-value-in-php">this one</a></p>
  
  <pre><code>$myvar = array ("key_name" =&gt; array("tom", "an", "bob"),
       "key_age" =&gt; array("1", "10", "12")
      );
  </code></pre>
  
  <p>I have tried lot of things but  I couldn't </p>
  
  <pre><code>foreach($myvar as $i){
      foreach ($i as $key =&gt; $value) {
          echo print_r($i);
      }
  </code></pre>