The words are always so pale,
The first array is the one that gets the id
array, and it's already sorted.
But the order of the data key values obtained below has been messed up. foreach
How to sort gracefully when not in use, with the same result as the first array order
Want to get the results like this
[ 131 => array(), 89 => array(), 141 => array(), 43 => array(), 140 => array(), ]
Reply content:
The words are always so pale,
The first array is the one that gets the id
array, and it's already sorted.
But the order of the data key values obtained below has been messed up. foreach
How to sort gracefully when not in use, with the same result as the first array order
Want to get the results like this
[ 131 => array(), 89 => array(), 141 => array(), 43 => array(), 140 => array(), ]
Isn't it nice to use foreach, and the view isn't just a foreach traversal? You can not deal with that. Cases
$this->view->assign('indexArray', $indexArray);$this->view->assign('dataArray', $dataArray);//--viewforeach ($indexArray as $id) { print_r($dataArray[$id]); //对不对?}