How to remove an element from an array in PHP
An element can be removed from an array by using PHP function unset.
To delete a specific element from an array, use index of the element:
$figures = array( 1, 2, 3, 4 ); unset( $figures[ 2 ] );
The element with the value 3 will be removed from the array.