>I'm looking for a function that does almost the same as array_unique() > >But it must also delete the other duplicate entry. <snip>
Untested pseudo-PHP follows - $encountered_elements = array(); foreach($original_array as $key => $val) if(in_array($val, $encountered_elements)) { unset($original_array[$key]); } else { $encountered_elements[$key] = $val; } --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php