开发者

php arrays sort

开发者 https://www.devze.com 2023-02-16 17:22 出处:网络
I have 2 arrays like th开发者_StackOverflow中文版ose: $a = array(152,32,113,47,53); $b = array(\"a\",\"w\",\"lk\",\"qw\",\"ol\");

I have 2 arrays like th开发者_StackOverflow中文版ose:

$a = array(152,32,113,47,53);

$b = array("a","w","lk","qw","ol");

I will sort $a by using asort() and I want to auto-sort the second array $b likewise $a.

How to do I?


You can use array_multisort.


http://us2.php.net/manual/en/function.array-multisort.php

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号