Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?
foreach ($array)
I thought that setting it
To avoid doing a search one can play around with array_diff:
array_diff
$array = array(3, 9, 11, 20); $array = array_diff($array, array(11) ); // removes 11
In this case one doesn't have to search/use the key.