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);
    }