In this tutorial, we are going to see how to remove the first element from an array in PHP. You can use PHP’s array_shift() function to remove the first element or the first value from an array. The array_shift() function also returns the value removed from the array. However, if the array is empty (or if the variable is not an array), the returned value will be NULL.
How to remove the first element from an array in PHP