Ok, this is kinda a toughy to explain. But, I have two arrays, and I want a function to return true, only if the second array (which is the requirements) are met by the first array.
Example: Please note that the number of objects within each array can change:
Now, each of these are from different tables, known could look something like this: ("1:5:3", "7:2:40"), while the second could look like so: ("1:5", "4:2"). The only parts from the first array that matter are the first two seperated by the colon: ("1:5" and "7:2");
So whats known is 1:5 and 7:2, however, in order to return true, I require 1:5 and 4:2. The first digits are the id, while the second are the levels.
As we can see, the function should return false, as the second condition is not met by the first.
Now, say the second array was ("1:3", "7:2")
This condition I want to return true, as the ids 1 and 7 are found in both for the requirement and the known, however the knowns second digit is >= that of the requirement; lvl 5 known lvl 3 needed.
Now, I can get this to work fine, if either of the conditions return true. Which is great for the arrays when there is only one condition required. However, when I get to two or three requirements, I want to be able to return true only if all are met. Any suggestions or ideas on how this could be accomplished? I have found nothing useable at php.net...