functions are evolved version of gosub/call - not goto w/ goto, there's no way of returning back to where you came from, unless you use another goto
-----Original Message----- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:52 AM To: php Subject: Fw: [PHP] GOTO command. Doest it exist? ----- Original Message ----- From: "hugh danaher" <[EMAIL PROTECTED]> To: "Carlos U. Cirello Filho" <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]> Sent: Tuesday, June 11, 2002 2:41 PM Subject: Re: [PHP] GOTO command. Doest it exist? > Many will tell you that the goto command is extinct. It isn't, it's just > evolved into the function command. What you do now is create a function: > > function some_name($variable,$other_variable,...) > { > some code here; > } > > then, call it using : > > call_user_func('some_name',$variable,$other_variable,...) > > It's just like goto, it goes to a specified code block and then returns to > the line below the call, but takes more typing. > Hope this helps. > Hugh > ----- Original Message ----- > From: "Carlos U. Cirello Filho" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, June 11, 2002 12:34 PM > Subject: [PHP] GOTO command. Doest it exist? > > > > I do beg your pardon... But does PHP not have GOTO command? > > > > Am I wrong? > > > > Carlos Cirello > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php