Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

Recommended Posts


$data[] = array('volume' => 67, 'asd'=>'b','edition' => 2);
$data[] = array('volume' => 86,'cc'=>'b', 'edition' => 1);
$data[] = array('volume' => 85, 'edition' => 6,'test'=>'b');
$data[] = array('eq'=>'b','volume' => 98, 'edition' => 2);
$data[] = array('volume' => 86, 'edition' => 3,'jr'=>'b');
$data[] = array('wt'=>'b','volume' => 67, 'edition' => 7);



$edit = array_column($data,'edition');





4.此时$data就按 edition 字段倒序的方式来排序了!!


5.如果还有其他排序条件,则往函数后添加,最后再填写$data。 和mysql order相似,参数的字段越前,优先级越高。

$vol = array_column($data,'volume');
$edit = array_column($data,'edition');


6.此时是先按 volume升序,然后值相同时就按 edition降序 来排序了!



Link to post
Link to comment
Share on other sites


discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    • Create New...