我要死在这里,任何帮助都会很棒。
我有一个数组,我可以根据特定键的值对 az 进行排序,但不能在反向 za 中排序。
我想按 ProjectName (za) 排序的数组示例:
Array
(
[0] => Array
(
[count] => 1
[ProjectName] => bbcjob
[Postcode] => 53.471922,-2.2996078
[Sector] => Public
)
[1] => Array
(
[count] => 1
[ProjectName] => commercial enterprise zone
[Postcode] => 53.3742081,-1.4926439
[Sector] => Public
)
[2] => Array
(
[count] => 1
[ProjectName] => Monkeys eat chips
[Postcode] => 51.5141492,-0.2271227
[Sector] => Private
期望的结果是维护整个数组键 -> 值结构,但顺序如下:
猴子吃薯条
商业企业区
bbcjob
我希望这是有道理的