Re: how to update array keys and keep element order ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 5/21/2010 5:56 AM, cr.vegelin@xxxxxxxxx wrote:
How do I update an array key without disturbing the element order ?
Suppose an existing array("FR", values ...)
where I want to change 0 =>  "FR" to "country" =>  "FR"
and keep the original element order.

TIA, Cor


I short on time; but, it seems array_combine() or array_fill_keys() would do it for you.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux