rm()

    boolean rm(string dn)
The rm() function removes attributes from the current working directory (DN) or from the optional specified DN. The attributes array is formed as an array of attribute names and values to be deleted.

An example attributes array follows:

    $entry["emailAddress"] = "bvila@thisoldhouse.com";
    $entry["garbage"][0] = "Delete Me";
    $entry["garbage"][1] = "Delete Me Too?";
Given the entry:
dn: cn=Bob Vila, ou=people, dc=ypass, dc=net
emailAddress: bvila@thisoldhouse.com
emailAddress: bob.vila@thisoldhouse.com
garbage: Delete Me
garbage: Don't Delete me
garbage: Delete Me Too?
If we pass the $entry array to rm(), the following attributes will be deleted:
emailAddress: bvila@thisoldhouse.com
garbage: Delete Me
garbage: Delete Me Too?

Example:

$ldap = new LDAP();
$ldap->cd("cn=Bob Vila, ou=people, dc=ypass, dc=net");

$entry["emailAddress"] = "bvila@thisoldhouse.com";
$entry["garbage"][0] = "Delete Me";
$entry["garbage"][1] = "Delete Me Too?";

$ldap->rm($entry);