array(3) {
[0]=>
array(2) {
[“url”]=>
string(103) “https://alicloud-bytedance-video.oss-cn-beijing.aliyuncs.com/dxb/1/06AE15576BF194C477256E840A940F4C.jpg"
[“width”]=>
float(1440)
}
[1]=>
array(2) {
[“url”]=>
string(103) “https://alicloud-bytedance-video.oss-cn-beijing.aliyuncs.com/dxb/1/0D9F49C886A654C48346FB25D77AAB63.jpg"
[“width”]=>
float(1440)
}
[2]=>
array(2) {
[“url”]=>
string(103) “https://alicloud-bytedance-video.oss-cn-beijing.aliyuncs.com/dxb/1/1C58C90855CF0D611AE84AAAD65626E5.png"
[“width”]=>
float(810.12658227848)
}
}
//根據寬度從小到大排序
1:
$width = array_column($newdata,’width’);
2:
array_multisort($width, SORT_ASC, $newdata);//陣列從小到大排序
本作品採用《CC 協議》,轉載必須註明作者和本文連結