我有一个多维数组,需要按值对其进行排序。当我尝试对其进行排序时,我得到了那个print_r()结果。
[0] => Array
(
[name] => Memory
[attribute_values] => Array
(
[0] => Array
(
[name] => test 1
[values] => Array
(
[0] => 1 Port
[1] => 10 Port s
[2] => 2 Port w
[3] => 3 Port D
[4] => 5
)
)
)
)
我需要这样:
[values] => Array
(
[0] => 1 Port
[1] => 2 Port w
[2] => 3 Port D
[3] => 5
[4] => 10 Port s
)
值中的文本可能非常不同,但我需要按 ASC 和 DESC 中的数字对其进行排序。有可能的?
素胚勾勒不出你