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

Sorting output to be returned to a HTML page using PHP

I am wanting to create a list of current users with basic information 
in a HTML form and allow users to access this list and if required  
obtain full details. I am using PHP.3.0.16 to process the 

My code displays a list of users with the required basic 
information. But when I try to sort the information, I get the 
following message.

Variable $a is not an array or string in /www/htdocs/php/zlaty.php3

My code is as follows:- 

 <?php { 
                      if ($ds) 
                       	$justthese = array ("sn", "givenname); 


                       	function EntryCompare($a,$b) 
                       			$sortfield = "sn"; 
                       					return 0; 

                       					return 1; 
                       					return -1; 


                       for ($i=0, $i<$info["count"]; $i++) 
           		            echo statement 

I have tried  the sort statement within the "for" 	statement, 
efining $a=array($info) and numerous combinations of array " ( and

I can not find a way to do the sort using the -S option and 

Can anyone let me know how to do this sort.
Any help would be very much appreciated.


  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