[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Sorting output to be returned to a HTML page using PHP
Doug
I have also posted this on a PHP mailing list , but to date they
have not been able to help me.
I have tried your amendment but I am still getting the same error
message.
Thanks for your quick reply and your time.
Tony
> On 22 May, Antonin Novak wrote:
> > function EntryCompare($a,$b)
> > {
> > $sortfield = "sn";
> > if($a[$sortfield]==$b[$sortfield])
> > {
> > return 0;
> > }
> >
> > if($a[$sortfield]>$b[$sortfield])
> > {
> > return 1;
> > }
> > else
> > {
> > return -1;
> > }
> > }
> >
> > I have tried the sort statement within the "for" statement,
> > efining $a=array($info) and numerous combinations of array " ( and
> > info.
>
> Results are multi-valued. Try using
>
> if ($a[$sortfield][0]==$b[$sortfield][0])
> if ($a[$sortfield][0]>$b[$sortfield][0])
>
> This probably belongs on a php mailing list.
>
> --
> Doug Nazar
> Dragon Computer Consultants Inc.
> Tel: (416) 708-1578 Fax: (416) 708-8081
----------------------------------------------------------------
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