|
Posted by Andy Hassall on 11/02/05 22:47
On Wed, 02 Nov 2005 05:12:34 -0600, Lars Eighner <eighner@io.com> wrote:
>Now you probably have noticed, integers have a natural order.
>But strings don't. So you have to be very careful if you ever
>think of trying to do something like sort an associate array or
>try to form and idea of "first," "last," or "next" in relation
>to an associative array. There is no general guarantee of order
>in an associate array.
PHP differs from Perl here, in that the key ordering is preserved, in the
order that the keys were assigned (or you can modify the ordering e.g. with
ksort).
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|