Greets all,

I have been playing around with LDAP sorting, but I can't seem to get it to
work.  Essentially, I do an ldap_search() with a filter condition, and use a
ldap_get_entries() to get all of the results.  The ldap_get_entries()
function returns a multi-dimensional array contain my result set.  I am
assuming it looks something like this:

Entries = array(
  "count" => x,
  array(
    array (
      "sn" => "Mowat",
      "givenname" => "Jason",
      ...
    ),
    array (
      "sn" => "Anderson",
      "givenname" => "Peter",
      ...
    ),
    array (
      ...
    )
  )

Now, I want to sort all of the internal "person" data by "sn".  But, when I
try usort, it does not work.  I have tried uasort as well.  Basically, I
need to be able to sort a nested array without touching the outside arrays
based on a value in the nested array's element..

The examples I have seen on the 'Net don't seem to work (for me anyways).  I
have even copied them verbatim, and I get the same results.  I'm not sure if
their Entries array is the same as mine.  Mine is the Entries returned from
ldap_get_entries().

Any help is appreciated!

Cheers,
Jason



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to