From: Justin F. <je...@ey...> - 2001-07-08 10:53:35
|
Odysseus: What will happen if the load_order value is a number? That means, what if the value of load_order is not quoted, but just a bare integer? Down the line, will this value be "interpreted" as an indexed array at that level, vhen the load_order value is used as a "key" later, and that value is an int? I suppose at the end of the day, 1. MUST WE ALWAYS QUOTE the load_order value in the $bc_page structure to have things work??? 2. MUST WE ALWAYS insure that, within a module group, you _must_ have a strict series of load_order(s) such as, 1,2,3,4....N? The uasort user-supplied comparison function will just return 0, if two load_orders are the same, and the behaviour/ordering is undefined. At that point, if there is no error trapped, then we will not know how to reference and/or talk to that module from another module since if you had, i.e., a group load_order set of 1,2,2,3,4...N, then WHO IS THEN OCCUPYING: $Page->modules['module'][2]??? I know you will want to say, well, just make sure you have a perfect sequence. I will then say, yea, but if I have load_order(s) 11,22,69, I still want it to work "as expected", and "find" the second module to talk to occupying $Page->modules['top'][1] where I would expect it, whereas, if I read you correctly, you would expect it at $Page->modules['top']['22'] if it is a "true" associative array, finally, and not an indexed array, finally. Er, anybody else out there as confused as I am?????? _jef ---------------------------- Odysseas Tsatalos wrote: > > The sorting works as expected. > > Array order and key-value association are two > different things in php. > uasort doesnot change the key association, i.e., you > should not see a 0 indexed element if you didn't > original create one with that key. > > Check the *sort man pages for more info. > > odysseas -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |