swap()
swap(array $array, mixed $pos1, mixed $pos2)
Swap the positions of elements in an array.
This operates directly on the array, and does not return anything.
Parameters
| array | $array | The array to operate on. |
| mixed | $pos1 | First position or key to swap. |
| mixed | $pos2 | Second position or key to swap. |