Forum Moderators: coopster

Message Too Old, No Replies

PHP function problem

array_multisort doing strange things...

         

IanKelley

2:55 am on Dec 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hey,

This:

array_multisort($launchdate,SORT_DESC,$sitename,$signupbonus,$referrallevels,$payoutmin,$linknstuff,$added);

Works perfectly except that it does not reorder the $sitename array at all.

On top of that I have this:

array_multisort($hits,SORT_DESC,$id,$name,$type,$date);

In another script and it works fine.

Makes no sense to me whatsoever... hoping it's a common bug?

Thanks,

Ian

IanKelley

3:11 am on Dec 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Problem solved... had $sitename as a global variable within the function.

Anyone else think the single largest shortcoming of PHP is the need to define global variables? ;-)