note 64104 deleted from function.ldap-add by bjori

From: Date: Fri, 07 Apr 2006 14:57:29 +0000
Subject: note 64104 deleted from function.ldap-add by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-107522@lists.php.net to get a copy of this message
Note Submitter: cyberkate24 at voila dot fr Reason: useless ---- LDAP doesn't like empty fields, and here is a code I've added in a code posted here, but which doesn't manage the case of an array in an array. I hope that will help you : $new_entry = array(); foreach ($entry as $key => $value) { if ($value != "") { if (is_array($value)) { foreach ($value as $mv_key => $mv_cur_val) { if ($mv_cur_val != '') { $new_entry[$key][$mv_key] = $mv_cur_val; } } } else { $new_entry[$key] = $value; } } }

« previous php.notes (#107522) next »