php remove array elements where item is the same code example
Example: php remove specific element from array
if (($key = array_search('strawberry', $array)) !== false) {
unset($array[$key]);
}
if (($key = array_search('strawberry', $array)) !== false) {
unset($array[$key]);
}