By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,303 Members | 1,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,303 IT Pros & Developers. It's quick & easy.

Re: I thought this would be easy: Matching array elements inside of a while loop

P: n/a
On Wed, 08 Oct 2008 17:54:45 -0400, in comp.lang.php Jerry Stuckle
>You're only checking against the first element of the array
($_items[0]). You need to loop through the items array each time you
fetch a result.

A better way would be to use in_array() to see if the currently fetched
item_id is in the $items array.
Thanks- I'm having much better luck using in_array().
J Moore
Oct 9 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.