UNIX / Solaris 8 Software Dictionary 3S Info LegoRacers Other Crap 

       yPass Home > yPass Software > PHP Modules > LDAP Class > count.html > count()
LDAP
XML
DNS

count()

    boolean count()
The count() function returns the number of entries returned by a search operation.

Example:

$ldap = new LDAP();
$ldap->search("(objectClass=person)");

echo $ldap->count() . " entries returned.<br>";
while($attrs = $ldap->fetch()) // Get all the returned attributes
{
	echo "DN is: " . $ldap->getDN();
	echo $attrs["cn"] . "<br>";
}