Hi
A user on my site chooses 2 options per row of data from 2 spearate list boxes.
e.g. first list box contains type of foods (apples, oranges, bananas) and the second list box contains a quantity, lets say 1-10.
So I choose Apples from list box one and the number 3 from list box two.
I am storing these choices into 2 session arrays.
To ensure a user has chosen an option from each list box a row, I use the following code:
$comparison = array_diff_assoc($_SESSION['S_FOOD_SELECTION'], $_SESSION['S_FOOD_QUANTITIES']);
This gives me any differences beteeen the session arrays but the problem is, it doesn't work if one of the arrays is empty!
Is there a similar function that will calculate if there is a difference between two arrays, even if one if them is completely empty?
Many Thanks
kbc