LDAP / Get_Values


1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:

// 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>";
?>

Description

  Get all values from a result entry