Php Programming Code Examples
Php > LDAP Code Examples
Get Values
Get Values
// List all values of the "mail" attribute for a directory entry
<?php
// $ds is a valid link identifier for a directory server
// $sr is a valid search result from a prior call to
// one of the ldap directory search calls
// $entry is a valid entry identifier from a prior call to
// one of the calls that returns a directory entry
$values = ldap_get_values($ds, $entry,"mail");
echo $values["count"]." email addresses for this entry.<p>";
for ($i=0; $i < $values["count"]; $i )
echo $values[$i]."<br>";
?>