RE: [PHP] IF this then, move to this line...

From: Date: Fri, 06 Apr 2001 08:48:25 +0000
Subject: RE: [PHP] IF this then, move to this line...
Groups: php.general 
Request: Send a blank email to php-general+get-47420@lists.php.net to get a copy of this message
You could use continue to skip to the start of a loop. e.g. while (1) { start of code you want to jump back too . . . if (so and so is true) continue; . . . . break; // exit loop } Unlike c php does not have a goto command. However what you describe does not sound like very good programming practice anyway. You should be able to arrange your code using functions etc so that you dont need this sort of goto method. -Stewart -----Original Message----- From: Brandon Orther [mailto:orther@webintellects.com] Sent: 05 April 2001 18:43 To: PHP User Group Subject: [PHP] IF this then, move to this line... Hello, Is there a way to make my script jump to a certain line in my code if a certain variable is true. like use an if then statement to check for a certain value, then if it is true jump back to line 34 (Any line really). Thanks Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#47420) next »