On Sat, 2004-02-07 at 03:09, Bobby R.Cox wrote: > Is it possible to explode an array and have it exclude a certain > string. I currently have an array that is an ldapsearch that returns > sub-accounts of a parent account. These accounts are then displayed so > customer can either change the passwd or delete them. Thing is > ldapsearch returns everymatch which includes the parent account, which > is already listed on the page as the parent account. I would like to > eliminate the second listing of the parent account where the > sub-accounts are listed.
Try this: $parent_account = 'parent_name'; $ldap_results = array('account1','account2','parent_name'); $results = array_diff($ldap_results, array($parent_account)); $results will now have only account1 and account2. -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php