public static function removeElementFromArray($elements, $array)
    {
        if (is_array($elements) && is_array($array))
        {
            foreach ($elements as $element)
            {
                if (in_array($element, $array))
                {
                    $key = array_search($element, $array);
                    unset($array[$key]);
                }
            }
        }
        return $array;
    }
public static function removeElementFromArray($elements, $array)
    {
        if (is_array($elements) && is_array($array))
        {
            foreach ($elements as $element)
            {
                if (in_array($element, $array))
                {
                    $key = array_search($element, $array);
                    unset($array[$key]);
                }
            }
        }
        return $array;
    }
public static function removeElementFromArray ( $ elements , $ array ) { if ( is_array ( $ elements ) && is_array ( $ array ) ) { foreach ( $ elements as $ element ) { if ( in_array ( $ element , $ array ) ) { $ key = array_search ( $ element , $ array ) ; unset ( $ array [ $ key ] ) ; } } } return $ array ; }
For example remove admins from writers array
@param $elements array
@param $array array
@return array
For example remove admins from writers array