Re: [PHP] Arrays Data
At 07:00 23/9/2001 -0700, Alawi Albaity wrote: >hi > >how can I remove duplicted values (Data) in my array ? my bad... I didn't check the manual... there's a function that does exactly that: http://www.php.net/manual/en/function.array-unique.php sorry... :) _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Arrays Data
At 07:00 23/9/2001 -0700, you wrote: >hi > >how can I remove duplicted values (Data) in my array ? there are several solutions to this problem, you can: 1 - use the function array_count_values() to find all the values that occur more then once and then loop trough the result array and removing all the duplicates. 2 - you can copy you array to a new one, but only copy values that aren't there... something like.. $your_array; $new_array=array(); // this is the one that should have no copies... foreach($your_array as $value) { if( !in_array($value,$new_aray) ) { $new_array[]=$value; } } at the end of this loop $new_array contains all data from $your_array with no duplicates... _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Arrays Data
So sprach »Alawi Albaity« am 2001-09-23 um 07:00:22 -0700 : > how can I remove duplicted values (Data) in my array ? array_unique Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 4 hours 35 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Arrays Data
hi how can I remove duplicted values (Data) in my array ? __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]