$arr[$newkey] = $arr[$oldkey];
unset($arr[$oldkey]);
More Related Contents:
- PHP – File to Associative Array with 1 key and two values attached
- Custom key-sort a flat associative based on another array
- count how many duplicate keys are in array of objects?
- In PHP, how do you change the key of an array element?
- Is there a way to find out how “deep” a PHP array is?
- How to combine two arrays together?
- How to re-index the values of an array in PHP? [duplicate]
- Characters allowed in php array keys?
- Associative array, sum values of the same key
- How to sort a date array in PHP
- Convert an associative array to a simple array of its values in php
- Get the keys for duplicate values in an array
- Comment associative array in PHP Documentor
- PHP get both array value and array key
- PHP – Merge two arrays (same-length) into one associative?
- PHP – Find parent key of array
- Merge row data from multiple arrays
- Merge multiple associative arrays and add missing columns with a default value
- Iterating over a complex Associative Array in PHP
- How to access first level keys of a 2d array with a foreach loop? [duplicate]
- Add elements to array which has gapped numeric keys to form an indexed array / list
- Generate an associative array from an array of rows using one column as keys and another column as values
- Group rows in an associative array of associative arrays by column value and preserve the original first level keys
- Prepend associative array elements to an associative array
- PHP/SQL Insert Error when using Named Placeholders
- php: how to get associative array key from numeric index?
- Implementing a simple lookup array
- Is there a way to change all keys in a flat indexed array to the same string (“Name”)? [closed]
- Conditionally add associative element to array
- array_diff to compare two associative arrays