public static function removeElementsFromArray($elements, &$array)
    {
        if (!is_array($elements))
        {
            $elements = [$elements];
        }
        $length = count($array);
        for ($i = 0; $i < $length; $i++)
        {
            $exist = false;
            foreach ($elements as $element)
            {
                if ($array[$i] == $element)
                {
                    $exist = true;
                    break;
                }
            }
            if ($exist)
            {
                unset($array[$i]);
            }
        }
        $array = array_values($array);
    }
public static function removeElementsFromArray($elements, &$array)
    {
        if (!is_array($elements))
        {
            $elements = [$elements];
        }
        $length = count($array);
        for ($i = 0; $i < $length; $i++)
        {
            $exist = false;
            foreach ($elements as $element)
            {
                if ($array[$i] == $element)
                {
                    $exist = true;
                    break;
                }
            }
            if ($exist)
            {
                unset($array[$i]);
            }
        }
        $array = array_values($array);
    }
public static function removeElementsFromArray ( $ elements , & $ array ) { if ( ! is_array ( $ elements ) ) { $ elements = [ $ elements ] ; } $ length = count ( $ array ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ exist = false ; foreach ( $ elements as $ element ) { if ( $ array [ $ i ] == $ element ) { $ exist = true ; break ; } } if ( $ exist ) { unset ( $ array [ $ i ] ) ; } } $ array = array_values ( $ array ) ; }
Remove element or array of elements from one dimensional array.

@param mixed $elements
@param array $array
Remove element or array of elements from one dimensional array .