FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » implode() order?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: implode() order? [message #176305 is a reply to message #176301] Tue, 20 December 2011 01:59 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Thomas Mlynarczyk wrote:

> Jerry Stuckle schrieb:
>> Mike wrote:
>>> Thanks... suppose the keys are not in a sortable order, like this:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> $toImplode = Array(
>>> "second" = "Second",
>>> "fourth" = "Fourth",
>>> "third" = "Third",
>>> "first" = "First"
>>> );
>
>> Use usort() and define your own comparison function.
>
> Rather u*k*sort() for sorting by keys:
> http://de3.php.net/manual/en/function.uksort.php

See the marked part.

You should also post the (manual) URI that works best for the person using
it, which would be

<http://php.net/uksort>

in this case.


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: implode() order?
Next Topic: FastCGI + ignore_user_abort
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 19:16:02 GMT 2024

Total time taken to generate the page: 0.08022 seconds