ldap_explodedn

The ldap_explodedn() function splits the supplied DN into its separate subcomponents. Each subcomponent is called a relative distinguished name (RDN).

The notypes argument specifies whether the RDNs are returned with only values or both values and attributes. Setting notypes to false returns both values and attributes. Setting notypes to true returns only values.

The RDNs are returned in a list. If only values were requested, then each list element contains one value. If both values and attributes have been requested, each result list element has the format "attribute=value".

result = ldap_explodedn (dn, notypes);
dn Required. A string that contains a Distinguished Name (DN).
notypes Required. An integer that represents a true or false value.

result is a list containing the DN subcomponents (that is, the RDNs). If only values are requested, then the list has the following format:

{"value", "value", …}

If both values and attributes are requested, then the list has the following format:

{"attribute=value", "attribute=value", …}.
result = ldap_explodedn (dn, false);

In this example, result is a list containing DN subcomponents. Both values and attributes are returned in this case.

For more information, please see ldap_dn2ufn.