note 33033 deleted from control-structures.do.while by didou

From: Date: Tue, 24 Jun 2003 13:16:58 +0000
Subject: note 33033 deleted from control-structures.do.while by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-50927@lists.php.net to get a copy of this message
Note Submitter: braintrino ---- You can do an infinite-loop by using this: do { SendDynamicWebPageAndQueryUserFormAction(); ProcessUserAction(); } while (true); You may ask why in the world do anyone want to do an infinity-loop? I'm not trying to waste CPU or trying to tie up the system here. You often need to do this as the main program when someone accesses your dynamic web-page as "index.php" When you generate dynamic web-page, and process user's action depending on his/her response, how in the world do you want to exit the program. If you do, what would the user's web-page display? A black-hole?! I suppose you can close their web-window if you are kind enough, or maybe shut-down their computer if you are dubious enough :)

« previous php.notes (#50927) next »