def valid_parentheses(string):
    """
    Takes a string of parentheses, and determines if the order of the parentheses is valid.
    :param string: a string of parentheses and characters.
    :return: true if the string is valid, and false if it's invalid.
    """
    stack = []
    for x in string:
        if x == "(":
            stack.append(x)
        elif x == ")":
            if len(stack) > 0:
                stack.pop()
            else:
                return False
    return not stack