Is there a way in PHP to move a specific iteration to a specific position in a loop?
For example, I have an array:
1, 2, 3, 4, 5, 6, 7, 8, 9
We have an array from 1 to 9, but I want 5 to be placed at the end of the iteration, so the result will look like this:
1
2
3
4
6
7
8
9
5
source
share