I would like select a specific item of a PHP array and place it at the end of the array. My array consist of an unknown number of items (that is, you don’t know in advance how many items there will be) and I would like to select the one with key Other and place it at the end of the array.
I’ve tried some with the array_diff(), but I couldn’t manage to select the Other item. I was able to select and unset the item with the Other-key in a foreach loop, but couldn’t place it at the end of the array. So any advice would be great.
1 Answer