function.
Example:
$ldap = new LDAP(); $ldap->search("(objectClass=person)"); while($attrs = $ldap->fetch()) // Get all the returned attributes echo $attrs["cn"] . "<br>"; $ldap->resetResult(); while($attrs = $ldap->fetch()) // Get all the returned attributes again echo $attrs["cn"] . "<br>";