« Return to Thread: Removeing duplicates inside for/foreach loop.

Re: Removeing duplicates inside for/foreach loop.

by tedd-2 :: Rate this Message:

Reply to Author | View in Thread

At 11:50 AM -0500 7/15/08, Niccolo Machiavelli wrote:
>$array = array(

-snip-

>My question is I want to remove duplicate order numbers in other words ditch
>*one* of the Mike Smith rows there's a duplicate order number there.
>
>And I need to do it in either a for/foreach loop. Somehow there's got to be
>a simple way to check and only output non duplicate order numbers while I'm
>looping thru the data. Any help would be greatly appreciated.

Niccolo:

Check out: array_unique

http://www.php.net/array_unique

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 « Return to Thread: Removeing duplicates inside for/foreach loop.