You are here: Replacing key in associative array « PHP Language « IT news, forums, messages
Replacing key in associative array

Posted by David Smithz on 01/30/07 02:05

Hi there,

I was wondering how I would replace the key in an associative array. Not
sure if I am missing something really simple here?

Lets say I have

key1 => value
key2 => value2

as my associative array. I want to run through this array and simply say,

if there is a key with value "key2", change this key name so it is instead
"key number 2" (while maintaining the keys value).

This is harder to achieve then I thought unless I'm getting myself in a
muddle?

any ideas?

Thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация