(PHP 4, PHP 5, PHP 7)

ldap_explode_dnSplits DN into its component parts


ldap_explode_dn ( string $dn , int $with_attrib ) : array

Splits the DN returned by ldap_get_dn() and breaks it up into its component parts. Each part is known as Relative Distinguished Name, or RDN.



The distinguished name of an LDAP entity.


Used to request if the RDNs are returned with only values or their attributes as well. To get RDNs with the attributes (i.e. in attribute=value format) set with_attrib to 0 and to get only values set it to 1.


Returns an array of all DN components, 或者在失败时返回 FALSE. The first element in the array has count key and represents the number of returned values, next elements are numerically indexed DN components.