I have a form that is built dynamically. Here's the form input
echo'<input class="input stickyinput" type="number" name="'.$pestname['scoutlogpestname'].'#'.$obj['card_id'].'" >
The $pestname['scoutlogpestname']
can always be different. The $obj['card_id']
can be any value from 1-50
. I placed the #
in the name figuring I would need a delimiter to explode with.
The array that prints looks like this. Numbers for any values entered and blank for any not entered.
Array
(
[Aphids#1] => 11
[Thrips#1] => 5
[White-Fly#1] => 7
[Aphids#2] =>
[Thrips#2] => 1
[White-Fly#2] => 22
[Aphids#3] => 4
[Thrips#3] => 1
[White-Fly#3] =>
etc....... possibly to 50
)
Can somebody please give me some insight on how to execute the explode loop so I can process the $pestname['scoutlogpestname']
and the $obj['card_id']
values? Thanks for looking.