What would be the best method of moving any element of an associative array to the beginning of the array?
For example, say I have the following array:
Here's another simple one-liner that gets this done using array_splice():
array_splice()
$myArray = array_splice($myArray,array_search('one',array_keys($myArray)),1) + $myArray;