While reading through the great online PHP tutorials of Paul Hudson he said
Perhaps surprisingly, infinite loops can sometimes be h
For user input...
while True: input = get_input_from_user("Do you want to continue? ") if input not in ("yes", "y", "no", "n"): print "invalid input!" else: break