To find the string ‘foo’ inside the array $array and remove it, you can do this.
unset($array[array_search('foo', $array)]); |
To find the string ‘foo’ inside the array $array and remove it, you can do this.
unset($array[array_search('foo', $array)]); |