相关疑难解决方法(0)

在PHP中对关联数组进行排序

我有这种格式的数组:

Array
(
    [0] => Array
        (
            [text] => tests
            [language] => 
            [advertiserCompetitionScale] => 5
            [avgSearchVolume] => 7480000
            [lastMonthSearchVolume] => 9140000
        )

    [1] => Array
        (
            [text] => personality tests
            [language] => 
            [advertiserCompetitionScale] => 5
            [avgSearchVolume] => 165000
            [lastMonthSearchVolume] => 201000
        )

    [2] => Array
        (
            [text] => online tests
            [language] => 
            [advertiserCompetitionScale] => 5
            [avgSearchVolume] => 246000
            [lastMonthSearchVolume] => 301000
        )

)
Run Code Online (Sandbox Code Playgroud)

如何按avgSearchVolume字段的降序排列该格式的数组?这有内置功能吗?

php arrays sorting

61
推荐指数
3
解决办法
7万
查看次数

标签 统计

arrays ×1

php ×1

sorting ×1