LDAP / Get_Attributes


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

<?php

// $ds is the link identifier for the directory

// $sr is a valid search result from a prior call to
// one of the ldap directory search calls

$entry ldap_first_entry($ds$sr);

$attrs ldap_get_attributes($ds$entry);

echo 
$attrs["count"]." attributes held for this entry:<p>";

for (
$i=0$i<$attrs["count"]; $i++)
    echo 
$attrs[$i]."<br>";
?>

Description

  Show the list of attributes held for a particular directory entry