9951 explained code solutions for 126 technologies

phpDelete an element from array by value

if (( $k = array_search($val, $arr)) !== false ) unset($arr[$k]);ctrl + c

will find key of an element with $val value


will have key of searched element (if any was found)


value to search in array


array to search value in


remove found element from array