how to remove single array element in php code example
Example 1: php remove specific element from array
if (($key = array_search('strawberry', $array)) !== false) {
unset($array[$key]);
}
Example 2: how to delete item from array php
$array = [0 => "a", 1 => "b", 2 => "c"];
unset($array[1]);