public static function removeByValue(array $array, ...$values)
    {
        foreach ($array as $key => $value) {
            if (in_array($value, $values, true)) {
                unset($array[$key]);
            }
        }

        return $array;
    }
public static function removeByValue(array $array, ...$values)
    {
        foreach ($array as $key => $value) {
            if (in_array($value, $values, true)) {
                unset($array[$key]);
            }
        }

        return $array;
    }
public static function removeByValue ( array $ array , ... $ values ) { foreach ( $ array as $ key => $ value ) { if ( in_array ( $ value , $ values , true ) ) { unset ( $ array [ $ key ] ) ; } } return $ array ; }
Remove items from an array based on their value. Keys are not changed.

**Does not recurse**, so be wary of using it with multidimentional
arrays.

The values passed to `$values` can be anything that is a valid array
value, but they're matched using `in_array` with `strict = true`.

@param array $array
@param mixed ...$values
@return array
Remove items from an array based on their value . Keys are not changed .