How to Remove Array Element and Then Re-Index Array?
You better use array_shift()
. That will return the first element of the array, remove it from the array and re-index the array. All in one efficient method.
You better use array_shift()
. That will return the first element of the array, remove it from the array and re-index the array. All in one efficient method.