[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Sorting output to be returned to a HTML page using PHP



I have tried your suggestion, and now get 
			Wrong datatype in uksort()

I cannot see from your code, where you do your sort.
If I do not sort the data, I have all users output but they are not in 
alphabetic order.
Sorry if my original message did not convey this.

Tony

> 
> I think you may use :
>               uksort($info[i],EntryCompare); /* info is char ***info
>               */
> instead of :
>               uksort($info,EntryCompare); 
> I use the following piece of code and it works :
> 
> --
> $info[i]
>  $filter="(uid=*)";
>  $justthese = array("uid");
> 
>  $sr=ldap_search($session_ldap, $base, $filter, $justthese);
>  $info = ldap_get_entries($session_ldap, $sr);
> 
>  print "<select name=user>\n";
>   for($i=0; $i<$info["count"]; $i++)
>     {
>       $user = $info[$i]["uid"][0];
>       print "<option value= $user >" . $user . "\n";
>     }
>  print "</select><br>\n";
> --
> 
> -- 
> Luc Mazardo
> Gnu Emacs:flame.el It's well known that life is worthlessness.



----------------------------------------------------------------
 
  Antonin Ch. Novak                    mailto:Antonin.Novak@cca.cz
  Systemovy administrator
  Systemova a technicka podpora
  CCA spol. s r.o.                    Web: http://www.cca.cz
  Kratka 8,  
  301 17 Plzen
  Czech Republic
  
  Tel: +42 019 7221253   
  Fax: +42 019 7222931