I'm trying to make an array with two-dimensional data that I can fill from an input field. I have the array with two-dimensional data already working, see code below.
$kaarten = array
(
array("Linksys Cisco EA2700","129,99"),
array("Apple iPad 4","479,00"),
array("Linksys Cisco RE1000","54,99")
);
foreach($kaarten as $subArray)
{
echo $subArray[0]; // test
echo $subArray[1]; // 12.99
}
But now the data is loaded from data within the php code and I want to make it so that you can fill it with input fields, so for example:
You start with 2 input fields (1. name 2. price). When you're done filling those there will be 2 buttons 1. send or 2. add 1 more, if you press the add 1 more 2 input fields will appear so you can enter more data into the array.
I hope someone can help me with my problem.
Or if someone has a better solution please don't hesitate to tell me. :)