我有以下数组:
items = array(
'note' => array(),
'text' => array(),
'year' => array()
)
所以我有:
[note] => Array
(
[0] => 'note1'
[1] => 'note2'
[2] => 'note3'
),
[text] => Array
(
[0] => 'text1'
[1] => 'text2'
[2] => 'test3'
),
[year] => Array
(
[0] => '2002'
[1] => '2000'
[2] => '2011'
)
我想按年排列上述数组。但是在移动元素时,我想移动其他数组中的相应元素(注意,文本)。
例如:
[note] => Array
(
[2] => 'note3'
[0] => 'note1'
[1] => 'note2'
),
[text] => Array
(
[2] => 'text3'
[0] => 'text1'
[1] => 'test2'
),
[year] => Array
(
[2] => '2011'
[0] => '2002'
[1] => '2000'
)