Browsing Category

PHP

Remove Last element from an array in PHP

You can use the PHP array_pop() function remove last element from an array in PHP. The array_pop() function returns the last value of the array. If array is empty or is not an array then NULL will be returned. Read Also: How to Remove…