how to sort the php two-dimensional array according to the order value in the one-dimensional array without changing the array order with the same order value
1. First grouping according to the order value, but they have to keep the previous order
2, then the grouping is sorted according to the order value from smallest to largest
3, and then assemble these arrays in a two-dimensional array
PS: can change the following first two-dimensional array into the second format
array(18) {
[0] => array(3) {
["id"] => string(5) "ele_0"
["order"] => string(1) "1"
["title"] => NULL
}
[1] => array(3) {
["id"] => string(5) "ele_1"
["order"] => string(1) "1"
["title"] => NULL
}
[2] => array(3) {
["id"] => string(5) "ele_2"
["order"] => string(1) "1"
["title"] => NULL
}
[3] => array(3) {
["id"] => string(5) "ele_4"
["order"] => string(1) "3"
["title"] => NULL
}
[4] => array(3) {
["id"] => string(5) "ele_5"
["order"] => string(1) "2"
["title"] => NULL
}
[5] => array(3) {
["id"] => string(5) "ele_6"
["order"] => string(1) "2"
["title"] => NULL
}
[6] => array(3) {
["id"] => string(5) "ele_7"
["order"] => string(1) "2"
["title"] => NULL
}
[7] => array(3) {
["id"] => string(5) "11329"
["order"] => string(1) "2"
["title"] => NULL
}
[8] => array(3) {
["id"] => string(5) "11330"
["order"] => string(1) "7"
["title"] => NULL
}
[9] => array(3) {
["id"] => string(4) "8252"
["order"] => string(1) "1"
["title"] => NULL
}
}
array(18) {
[0] => array(3) {
["id"] => string(5) "ele_0"
["order"] => string(1) "1"
["title"] => NULL
}
[1] => array(3) {
["id"] => string(5) "ele_1"
["order"] => string(1) "1"
["title"] => NULL
}
[2] => array(3) {
["id"] => string(5) "ele_2"
["order"] => string(1) "1"
["title"] => NULL
}
[9] => array(3) {
["id"] => string(4) "8252"
["order"] => string(1) "1"
["title"] => NULL
}
[4] => array(3) {
["id"] => string(5) "ele_5"
["order"] => string(1) "2"
["title"] => NULL
}
[5] => array(3) {
["id"] => string(5) "ele_6"
["order"] => string(1) "2"
["title"] => NULL
}
[6] => array(3) {
["id"] => string(5) "ele_7"
["order"] => string(1) "2"
["title"] => NULL
}
[7] => array(3) {
["id"] => string(5) "11329"
["order"] => string(1) "2"
["title"] => NULL
}
[3] => array(3) {
["id"] => string(5) "ele_4"
["order"] => string(1) "3"
["title"] => NULL
}
[8] => array(3) {
["id"] => string(5) "11330"
["order"] => string(1) "7"
["title"] => NULL
}
}