将关联数组的任何元素移动到数组开头的最佳方法是什么?
例如,假设我有以下数组:
$myArray = array(
'two' => 'Blah Blah Blah 2',
'three' => 'Blah Blah Blah 3',
'one' => 'Blah Blah Blah 1',
'four' => 'Blah Blah Blah 4',
'five' => 'Blah Blah Blah 5',
);
我想要做的是将“一个”元素移动到开头并以以下数组结尾:
$myArray = array(
'one' => 'Blah Blah Blah 1',
'two' => 'Blah Blah Blah 2',
'three' => 'Blah Blah Blah 3',
'four' => 'Blah Blah Blah 4',
'five' => 'Blah Blah Blah 5',
);