I have a html form with the following input tags
<input type="text" name="parcelnumber[]" id="parcelnumber" class="gui-input" placeholder="Parcel Number">
<input type="text" name="section[]" id="section" class="gui-input" placeholder="Section">
The user is given the ability to dynamically add extra parcel numbers.
How can I use a foreach loop to echo each Section for each Parcel numbers?
The below foreach loop is not giving me the results I want. The last section is repeated again for the first parcel loop. That is why it is not giving me the echo result I am after.
$parcels = $_POST['parcelnumber'];
$sections = $_POST['section'];
foreach($parcels as $parcel) {
foreach ($sections as $section) { }
echo $parcel . $section . "<br>";
}
