public static function unsetFields($array, $fields = null)
    {
        if (!is_array($array)) {
            $fields = [];
        }
        foreach ($array as $key => $value) {
            if (is_string($key) && in_array($key, $fields)) {
                unset($array[$key]);
            }
        }
        return $array;
    }
public static function unsetFields($array, $fields = null)
    {
        if (!is_array($array)) {
            $fields = [];
        }
        foreach ($array as $key => $value) {
            if (is_string($key) && in_array($key, $fields)) {
                unset($array[$key]);
            }
        }
        return $array;
    }
public static function unsetFields ( $ array , $ fields = null ) { if ( ! is_array ( $ array ) ) { $ fields = [ ] ; } foreach ( $ array as $ key => $ value ) { if ( is_string ( $ key ) && in_array ( $ key , $ fields ) ) { unset ( $ array [ $ key ] ) ; } } return $ array ; }
unset fields of array.
@param array $array
@param array $fields
@return array
unset fields of array .