Guest User

Untitled

a guest
May 27th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. $ar = array(
  2. array("10", 11, 100, 100, "a"), //10
  3. array( 1, 2, "2", 3, 1)
  4. );
  5. array_multisort($ar[0], SORT_ASC, SORT_STRING,
  6. $ar[1], SORT_NUMERIC, SORT_DESC);
  7. var_dump($ar);
  8.  
  9.  
  10. array(2) {
  11. [0]=>
  12. array(5) {
  13. [0]=>
  14. string(2) "10"
  15. [1]=>
  16. int(100)
  17. [2]=>
  18. int(100)
  19. [3]=>
  20. int(11)
  21. [4]=>
  22. string(1) "a"
  23. }
  24. [1]=>
  25. array(5) {
  26. [0]=>
  27. int(1)
  28. [1]=>
  29. int(3)
  30. [2]=>
  31. string(1) "2"
  32. [3]=>
  33. int(2)
  34. [4]=>
  35. int(1)
  36. }
  37. }
Add Comment
Please, Sign In to add comment