title: php parse array values
body: <p>I'm not very good when it comes to arrays so here's probably something very simple but not for me! I'm getting an array of values via POST and I need to parse them and store the values in a table. How should I use the classic parsing such as:</p>
  
  <pre><code>foreach($array as $a) {
    $text = $a-&gt;text;
    $name = $a-&gt;user-&gt;name;
  }
  </code></pre>
  
  <p>etc to parse an array looking like this:</p>
  
  <pre><code>[item] =&gt; Array
          (
              [tags] =&gt; Array
                  (
                      [0] =&gt; Bluetooth
                      [1] =&gt; WiFi
                      [2] =&gt; USB
                  )
  
          )
  
  This is the entire POST array:
  
  Array
  (
      [prodid] =&gt; 
      [Submit] =&gt; Save
      [productcode] =&gt; 797987
      [cat_id] =&gt; 66
      [brand] =&gt; Fysiomed
      [name] =&gt;  asdc asdc asd c
      [productnew] =&gt; yes
      [item] =&gt; Array
          (
              [tags] =&gt; Array
                  (
                      [0] =&gt; Bluetooth
                      [1] =&gt; WiFi
                      [2] =&gt; USB
                  )
  
          )
  
      [size] =&gt; 1
      [barcode] =&gt; 7979871
      [price] =&gt; 233.00
      [priceoffer] =&gt; 0.00
      [stock] =&gt; 50
      [weight] =&gt; 0.30
      [orderby] =&gt; 1
  )
  </code></pre>