I have managed to get information from our MS Exchange 5.5 server using LDAP.
The only problem is that the results don't sort well.
If i only search on 1 field then thats OK, but i search multiple fields it doesn't order well at all.
Any ideas how i might sort them??
(i have seen the LDAP_Sort function, however, i run PHP4.1.2 and the manual entry was very vague indeed)
This is the code I'm using to retrieve the info.
$retrieved_fields = array ( "givenname", "sn", "title", "department", "telephonenumber");
@$sr=ldap_search($ds,"o=Benenden Healthcare Society, c=US", $search_terms, $retrieved_fields);
$matches = ldap_count_entries($ds,$sr);
$info = ldap_get_entries($ds, $sr);
for ($i = 0; $i < $info["count"]; $i++)
{
?>
<tr>
<td class="searchcontent"> <?=$info[$i]["givenname"][0]?> </td>
<td class="searchcontent"> <?=$info[$i]["sn"][0]?> </td>
<td class="searchcontent"> <?=$info[$i]["title"][0]?> </td>
<td class="searchcontent"> <?=$info[$i]["department"][0]?> </td>
<td class="searchcontent"> <?=$info[$i]["telephonenumber"][0]?> </td>
</tr>
<?
}
TIA
Jamie