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

Home » Imported messages » comp.lang.php » Inserting into associative array
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Inserting into associative array [message #169996 is a reply to message #169926] Mon, 04 October 2010 03:25 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Thu, 30 Sep 2010 14:12:48 +0200, Jonathan Stein wrote:
> Den 29-09-2010 22:05, Michael Fesser skrev:
>
>> Nope. But maybe you could explain why you need such a special order,
>> which can't be achieved with the given array sorting functions.
>
> In a Drupal module, I need to modify an array, that is later used to
> build an input form - and the input fields will appear in the same order
> as the elements in this associative array.

Ah. If you can arrange your keys to be sortable, you might find ksort()
handy. If you want them in an arbitrary order, you're going be doing a
lot more work...

--
The Write Many, Read Never drive. For those people that don't know
their system has a /dev/null already.
-- Rik Steenwinkel, singing the praises of 8mm Exabytes
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP 5.3.3 Crashes on Win7
Next Topic: Dot in array key name
Goto Forum:
  

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

Current Time: Sun Nov 24 04:54:56 GMT 2024

Total time taken to generate the page: 0.04832 seconds