Hi all
I have pairs of list boxes on a form. If a user chooses a value from a list box on the left of my form they are required to choose a second list box that is associated to the first list box (kind of 'choose your room' / 'choose your room quantity' options).
Now, I have the list boxes posting but I need to run some validation on the arrays which collect the data and if an array key exists in one array but not the other, throw an exception.
An example of my 2 arrays (one array for each list box) would be as follows:
Array
(
[1] => Array
(
[1] => 1
)
)
Array
(
[1] => Array
(
[1] => 1
[2] => 1
)
)
So here you can see the user chose Option Value 1 from the first paired list boxes but only chose an option from the second pair of list boxes.
How can I compare these arrays to flag if there is an indifference as described?
I hope that makes sense!
Any advice would be grateful.
kbc