Re: [PHP] [4.3.4] Can't ksort a subarray

2004-03-25 Thread Richard A. DeVenezia
Red Wingate wrote: > while (list($key,$dim2) = each ($A)) { > uksort ( $A[ $key ] , "strcasecmp"); > } > print_r ($A); > > $dim2 will not change $A[ $key ], so you will have to change your > script to alter them directly. > > -- red > Like thus: uksort ($myArray, "strcasecmp"); foreach (arr

Re: [PHP] [4.3.4] Can't ksort a subarray

2004-03-25 Thread Red Wingate
while (list($key,$dim2) = each ($A)) { uksort ( $A[ $key ] , "strcasecmp"); } print_r ($A); $dim2 will not change $A[ $key ], so you will have to change your script to alter them directly. -- red [] > I have this little code. > I want all arrays sorted case insensitive key order, but only

[PHP] [4.3.4] Can't ksort a subarray

2004-03-25 Thread Richard A. DeVenezia
I have this little code. I want all arrays sorted case insensitive key order, but only the first dimension gets key sorted properly Thanks -- Richard A. DeVenezia array ( "x" => 1, "Z" => 2, "y" => 3) , "b" => array ( "z" => 1, "Y" => 2, "x" => 3) , "A" => array ( "z" => 1, "X" => 2) ); print_r