Tough comparison problem.
| From: | blawson@vvm.com | Date: | Thu, 26 Apr 2001 14:41:46 +0000 |
| Subject: | Tough comparison problem. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50465@lists.php.net to get a copy of this message | ||
I've got two functions that return data in an array. I need to compare the
individual elements of one array against the elements of another, and do
something within an if-else statement.
I'm using php3, so I don't have an actual "foreach" loop to pick out the
array elements. Instead, I use:
while(list(, $element)=each($array)){
Basically, here's what I need to do:
Pull element 1 out of array 1,
Compare it to all elements of array 2,
Do something (if-else) based on the results of that comparison,
Pull element 2 out of array 1,
Compare it to all elements of array 2,
and so on until all elements of array 1 have been compared to all elements
of array 2.
Any help is greatly appreciated!