I'm hoping this is really simple, and I'm missing something obvious!
I'm trying to remove all elements in an array that match a certain string. It's a basic 1D array.
array("Value1", "Value2", "Value3", "Remove", "Remove");
I want to end up with
array("Value1", "Value2", "Value3");
Why does array_filter($array, "Remove"); not work?
Thanks.
array_filter($array, function($a) {return $a !== "Remove";});