I have my code in HTML that is setting the arrays of the values to pass via POST but I don't know how to access them in the php file.
This is 'main.php':
<tr> <td><input name="item[0][item]" type="text" id="item" size="5" /></td> <td><input name="price[0][price]" type="text" id="price" size="5" /></td> <td><input name="order_date[0][order_date]" type="text" id="order_date" size="5" /></td> </tr> <tr> <td><input name="item[1][item]" type="text" id="item" size="5" /></td> <td><input name="price[1][price]" type="text" id="price" size="5" /></td> <td><input name="order_date[1][order_date]" type="text" id="order_date" size="5" /></td> </tr> At 'next.php' where the HTML code is sent I have:
echo "<pre>"; print_r($_POST); echo "</pre>"; which gives me:
Array ( [item] => Array ( [0] => Array ( [item] => item1 ) [1] => Array ( [item] => item2 ) ) [price] => Array ( [0] => Array ( [price] => 80.00 ) [1] => Array ( [price] => 59.99 ) ) [order_date] => Array ( [0] => Array ( [order_date] => 2016-05-01 ) [1] => Array ( [order_date] => 2016-05-31 ) ) )