I think you should name the fields in different way rather than the array price[] to something like
price_1, size_1
price_2, size_2,
......
price_n, size_n
And in the same way you should get them in the submitting script/page.
PHP Code:
$index = 1;
foreach($product['varieties'] as $variety){
echo '<input style="width:10px; margin-left:9px; " name="price_' . $index . '" type="checkbox" value="' . $variety['price']. '" />';
echo '<input name="size_' . $index . '" type="text" value="' . $variety['size']. '" />';
$index++;
}
Bookmarks