php remove particular value from array code example
Example 1: php remove specific element from array
if (($key = array_search('strawberry', $array)) !== false) {
unset($array[$key]);
}
Example 2: PHP: How to remove specific element from an array?
if (($key = array_search('strawberry', $array)) !== false) {
unset($array[$key]);
}