是否可以对子模式数组键进行排序,以便 Gender 排在第一位,Name 排在第二位,Age 排在第三位,而不是 Name、Age、Gender
另外,是否可以使用数字键和值,而只保留关联的键和值?
Array
(
[categoryOne] => Array
(
[0] => Array
(
[0] => Dave | 12 | M
[Name] => David
[1] => David
[Age] => 12
[2] => 12
[Gender] => M
[3] => M
)
[1] => Array
(
[0] => Lisa | 44 | F
[Name] => Lisa
[1] => Lisa
[Age] => 44
[2] => 44
[Gender] => F
[3] => F
)
)
[categoryTwo] => Array
(
[0] => Array
(
[0] => Ann | 32 | F
[Name] => Ann
[1] => Ann
[Age] => 32
[2] => 32
[Gender] => F
[3] => F
)
)
)