0
我必须按照存储在内部数组中一个字段(笑话)上的字符串的长度对二元数组排序。按字符串长度对三维数组进行排序PHP
Array(
'type' => 'success',
'value => array (
0 => array (
'id' => 1
'joke' => 'Chuck Norris uses ribbed condoms inside out, so he gets the pleasure.');
1 => array (
'id' => 2
'joke' => 'MacGyver can build an airplane out of gum and paper clips. Chuck Norris can kill him and take it.');
);
);
我已经tryed几个方面,但如果你需要使用非平凡的比较一个不错的选择将是使用usort()
数组进行排序,我不能得到它的权利
,所以你要排序只是'joke'键嵌套数组? – RomanPerekhrest