ldap_explode_dn

array ldap_explode_dn(string DN, int attribs) 
DN Distinguished name to convert into an array
attribs Attributes specifier

Makes an array of the distinguished name.

Returns:

Array of distinguished name components

Description:

ldap_explode_dn() splits a distinguished name (DN) into its relative distinguished name (RDN) values and returns the result in an array. The attribute specifier determines whether the attributes are returned along with the relative distinguished name values. Set to 1 if the attributes are required; otherwise, set to 0.

Availability:

UNIX/Linux, Windows

Version:

3+, 4+

Example:

Convert a distinguished name into an array of relative distinguished names
 $rdn = ldap_explode_dn("uid=myname,dc=foo,dc=com", ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.