title: loop through subArray as $key => $value in PHP
body: <p>given this <strong>data structure</strong>:</p>
  
  <pre><code>    array(2) {
      [0] array(7) {
          ["model_id"] 218
          ["total"] 10
          ["brand"] "This Brand"
          ["model_name"] "This Name"
          ["picture"] "this pic.jpg"
          ["color"] "Black"
          ["sizes"] array(3) {
              ["4"] "10 %"
              ["5"] "80 %"
              ["6"] "10 %"
          }
      }
      [1] array(7) {
          ["model_id"] 219
          ["total"] 10
          ["brand"] "This Brand"
          ["model_name"] "ThatName"
          ["picture"] "that pic.jpg"
          ["color"] "Black"
          ["sizes"] array(3) {
              ["4"] "20 %"
              ["5"] "50 %"
              ["6"] "30 %"
          }
      }
  }
  </code></pre>
  
  <p>How can you loop into <strong>sizes</strong> as <code>$key =&gt; $value</code> ?</p>
  
  <p>What I tried didn't work so far, like nested loops.</p>
  
  <pre><code>foreach($array as $i){
  
              foreach($i as $z){
  
                  foreach($z as $key =&gt; $value){
  
                      print_r($key);
  
                  }  
              }
          }
      }
  </code></pre>
  
  <p>results in <strong>error</strong>: <strong><code>Invalid argument supplied for foreach()</code></strong></p>