php remove specific element from array
snippet in php

php remove specific element from array

user6254

if (($key = array_search('strawberry', $array)) !== false) {
    unset($array[$key]);
}