|
Posted by Marc Bauer on 10/04/07 21:51
Hi
i'd like to replace an array key, but i cannot figure out how this could
work.
As an example this array:
$array1 = array('key1' => 'value1', 'key2' => 'value2', 'key3' =>
'value3' );
Now, i'd like to replace the 'key2' => 'value2' with 'key4' => 'value4' and
the array should look like:
$array1 = array('key1' => 'value1', 'key4' => 'value4', 'key3' =>
'value3' );
The order of the keys is important... so i must replace on the same array
position.
Regards
Marc
Navigation:
[Reply to this message]
|