string getParentDir([string dn])
If a DN is not passed, this function will return the DN/path of the parent directory of the current working directory. If a DN is passed, it returns the parent directory of the DN specified.


$ldap = new LDAP();
$ldap->cd("cn=Eric, ou=people, dc=ypass, dc=net");
if ($ldap->getParentDir() == "ou=people, dc=ypass, dc=net")
	echo "It worked.";
	echo "It didn't work.";
/* The following two function calls have the same effect */