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:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]