[PHP-NOTES] note 130323 added to function.array-multisort

[email protected] ("[email protected]")
Newsgroups php.notes
Message-ID <[email protected]>
此函数的参数过于灵活,现在在此记录一下有助于理解和记忆的调用解释:
 $sortByArr1 = [  /*若干元素*/  ];  //要参考并排序的数组1
 $sortByArr2 = [ /*若干元素*/ ];  //要参考并排序的数组2
 $targetArrEnd = [ /*若干元素*/ ];  //我们关注的要关联排序的最终数组

//传惨方式1
array_multisort( $sortByArr1 , $sortByArr2 , $targetArrEnd );

//或者在每个参考数组后提供排序选项
array_multisort( $sortByArr1 , SORT_ASC , SORT_REGULAR,$sortByArr2,$targetArrEnd);

//功能:参考前面的数组对最后一个数组进行相对位置排序
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 240e:3b4:d0c3:6e70:2e66:57f3:caaf:30a1)
----
Manual Page -- https://php.net/manual/en/function.array-multisort.php
Edit        -- https://main.php.net/note/edit/130323
Del: integrated  -- https://main.php.net/note/delete/130323/integrated
Del: useless     -- https://main.php.net/note/delete/130323/useless
Del: bad code    -- https://main.php.net/note/delete/130323/bad+code
Del: spam        -- https://main.php.net/note/delete/130323/spam
Del: non-english -- https://main.php.net/note/delete/130323/non-english
Del: in docs     -- https://main.php.net/note/delete/130323/in+docs
Del: other reasons-- https://main.php.net/note/delete/130323
Reject      -- https://main.php.net/note/reject/130323
Search      -- https://main.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.