Re: IF this then, move to this line...

From: Date: Thu, 05 Apr 2001 17:50:48 +0000
Subject: Re: IF this then, move to this line...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47296@lists.php.net to get a copy of this message
"Brandon Orther" <orther@webintellects.com> wrote: > 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). Ahh, the good old days of GOTOs in BASIC. ;-) There isn't a method for referring to a line number within PHP. Enclose your code in functions and do this: if () { true_function_here(); } else { false_fucntion_here(); } If you haven't worked with functions, consult the online manual. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/

« previous php.general (#47296) next »