array_pop()
to remove and return the last element of an arrayarray_pop()
to remove and return the last element of an arrayarray_pop()
removes and returns the last element of an array. It reduces the array length by one and updates the array in place. This function is handy when you need to retrieve and remove the last element from an array.