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

From: Date: Thu, 05 Apr 2001 17:57:09 +0000
Subject: RE: [PHP] IF this then, move to this line...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47298@lists.php.net to get a copy of this message
Yeah, Memories... of Basic... Ok thanxs for the info :) brandon -----Original Message----- From: Steve Werby [mailto:steve-lists@befriend.com] Sent: Thursday, April 05, 2001 10:51 AM To: Brandon Orther; PHP User Group Subject: Re: [PHP] IF this then, move to this line... "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 (#47298) next »