I have a function which I am entering an array, and the job of the function is to match the entered array to an array within the list. It looks a little something like this...
PHP Code:
function Test( arry ) {
temp.list = {
{"Test One", "Test Two"},"String One",
{"Test Three", "Test One"},"String Two",
{"Test Three", "Test Two"},"String Three"
};
//matching script should go here
return appropriate string;
}
Thing is I can't compare them directly. Because the fed array may be in a different order. For example, if 'arry' is {"Test Two", "Test One"} I still need it two return "String One".
If there are no matches, OR if 'arry' contains a match but has extra items which are not in the list (i.e {"Test One", "Test Two", "Test Three"}) it should return false.
I could probably do some magic and come up with a way to match these, but I'd like to see some of your ideas to match them as there is probably a much better way then what I would do.
Thanks
