public static function filter(array $fields)
    {
        if (array_values($fields) === $fields)
        {
            if (($key = array_search('id', $fields)) !== false)
            {
                unset($fields[$key]);
            }
        }
        else
        {
            unset($fields['id']);
        }
        return $fields;
    }
public static function filter(array $fields)
    {
        if (array_values($fields) === $fields)
        {
            if (($key = array_search('id', $fields)) !== false)
            {
                unset($fields[$key]);
            }
        }
        else
        {
            unset($fields['id']);
        }
        return $fields;
    }
public static function filter ( array $ fields ) { if ( array_values ( $ fields ) === $ fields ) { if ( ( $ key = array_search ( 'id' , $ fields ) ) !== false ) { unset ( $ fields [ $ key ] ) ; } } else { unset ( $ fields [ 'id' ] ) ; } return $ fields ; }
Delete ID field from arrays
@param array $fields
@return array Fields without ID
Delete ID field from arrays