POSTing data using for-each with javascript and php?
<p>foreach loop only repeating the last element of the arary?</p>

<p><strong>java Script Code :</strong></p>

<pre><code> &lt;?php foreach($_REQUEST["itemprice"] as $itemprice)
    {
        ?&gt;
        + "&amp;itemname_price[]=&lt;?php echo $itemname?&gt;_price=" + &lt;?=$itemname?&gt;_price.value
         &lt;?php
    }
    ?&gt;
</code></pre>

<p><strong>Code to request that data</strong></p>

<pre><code>    $items_price = array();
    foreach($_REQUEST['itemname_price'] as $itemname_pric) {
              $items_price[]=$itemname_pric;
     }
     print_r($items_price);
</code></pre>
