The problem comes when I am echoing more than one order on a page and submitting it. This is my form:
<input name="checkOrder['.($row['ord_no']).'][ord_no]" value="'.($row['ord_no']).'" type="checkbox" class="checkOrder" id="checkOrder">
<input type="hidden" name="checkOrder['.($row['ord_no']).'][item_seq_no]" value="'.$line_number.'" />
<input type="hidden" name="checkOrder['.($row['ord_no']).'][item_no]" value="'.$item_number.'" />
<input type="hidden" name="checkOrder['.($row['ord_no']).'][item_desc_1]" value="'.$item_description.'" /></input>
Right now my ouput is this:
Array ( [ord_no] => 1000007 [item_seq_no] => 1 [item_no] => 001 [item_desc_1] => item1 )
Array ( [ord_no] => 1000008 [item_seq_no] => 1 [item_no] => 002 [item_desc_1] => item2 )
Array ( [ord_no] => 1000000 [item_seq_no] => 1 [item_no] => 003 [item_desc_1] => item3 )
Array ( [ord_no] => 1000001 [item_seq_no] => 1 [item_no] => 001 [item_desc_1] => item1 )
I would prefer this:
[checkOrder] => Array
(
[ord_no] => 1000007
(
[item_seq_no] => 1 [item_no] => 001 [item_desc_1] => item1
)
[ord_no] => 1000008
(
[item_seq_no] => 1 [item_no] => 002 [item_desc_1] => item2
)
[ord_no] => 1000000
(
[item_seq_no] => 1 [item_no] => 003 [item_desc_1] => item3
)
[ord_no] => 1000001
(
[item_seq_no] => 1 [item_no] => 001 [item_desc_1] => item1
)
)
So how do I change my form to create one big array rather than multiple or am I not thinking about this correctly. Right now I am inserting all of these that are checked into a table inside a foreach loop. Then sending one email outside my foreach. It is only inserting the first array order # into the email. When I actually need everyone that was checked. I believe with this other array I have in mind it will fix my problem. If you want more info please let me know.