Re: Tough Select List with multiple arrays
| From: | Rasmus Lerdorf | Date: | Thu, 19 Oct 2000 01:01:06 +0000 |
| Subject: | Re: Tough Select List with multiple arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21032@lists.php.net to get a copy of this message | ||
On Wed, 18 Oct 2000, Angelko Krstanovic wrote:
> kul. rasmus responded with similar solution minutes before i did,
> and he also included explanations. lemme know if that will do
> for you.
Yup, very similar. I had an extra loop in there because I was going to do
an array_intersect() call on the two arrays. But since 1 array is always
a subset of the other in this particular case it wasn't needed so I didn't
do it and forgot to roll the output stuff back into the second loop.
If every game associated with a user in the database might not appear in
the list of all games for some reason, then you would need to do an
array_intersect() on it.
-Rasmus