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]