title: Send existing multidimensional array via POST
body: <p>On my page I have a multidimensional array which I need to pass to another page, and from that page I'm going to send the array to controller. The array will be always hidden to simplify a form.<br> I searched a little but didn't find an answer to my question.
  So it looks like this</p>
  
  <pre><code>&lt;form action="index.php?route=common/fittingForm" method="post"&gt;
      &lt;?php foreach($products as $product) { ?&gt;
          &lt;input type="hidden" name="products[]" value="&lt;?php echo $product; ?&gt;" &gt;
      &lt;?php } ?&gt;
      &lt;input type="submit" value="Buy" class="buy_button"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And the page that gets the array looks like this</p>
  
  <pre><code>&lt;?php $products = $_POST["products"]; ?&gt;
  &lt;?php
      foreach($products as $product)
          echo $product['model'];
   ?&gt;
  </code></pre>
  
  <p>And of course everything doesn't work. And I don't know why.
  Thank you for your attention.</p>