Re: Break message in code.

From: Date: Wed, 17 Jul 2002 04:45:05 +0000
Subject: Re: Break message in code.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108028@lists.php.net to get a copy of this message
Have you tried using just break? without the 1? Jason Reid jason@achost.ca ----- Original Message ----- From: "W. Andy Roche" <andy.roche@ambushsite.com> To: <php-general@lists.php.net> Sent: Tuesday, July 16, 2002 10:11 PM Subject: [PHP] Break message in code. > Please forgive me, I am still rather new to coding in PHP. I have looked up > this problem on the PHP.net site, and check my syntax, but I am just not > getting it. > > Here is my problem: > I am working on an email page that will vaildate that there is content in > the variables, and respond if there is not. Here is the code to check the > variable: > > If (empty ($sndrname)) { > $error_report_msg = "Please provide a contact name.<br>"; > error_msg_form($error_report_msg); > break 1; > } > > When this is run, the server returns the expected output, but adds the > following below it: > > Fatal error: Cannot break/continue 1 levels in > /home/igraph/public_html/rhc/inforeq.php on line 82 > > Line 82 is the break statement. This code was working at one, time, and I > changed nothing other than PHP versions. Is there is change due to the > versions that I didn't find? > > TIA, > W. Andy Roche > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#108028) next »