Re: parse error

From: Date: Mon, 09 Apr 2001 00:28:18 +0000
Subject: Re: parse error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47691@lists.php.net to get a copy of this message
Three questions : 1. What is the parse error. 2. What line corresponds with the parse error. 3. What are the two lines above the line in #2 Regarding your code, it works (no parse error) for me. Two possible issues/guesses/warnings are : a. Foreach is php4+ (see manual for alternatives) b. $messagearray must be an array (see is_array()) Also, it helps people debug if the exact error is given as it takes much less time to debug (i.e. don't have to read all the code). Good luck ;) regards, Philip On Mon, 9 Apr 2001, kenny.hibs wrote: > I am getting a parse error in the following line of code > > ************************** > foreach ($messagearray as $value) { > //print("strlen: " . strlen($value)); > if (strlen($value) >= 22) { > ?> > <script> > alert('Your post is too long...use the forum for longer stories.') > </script> > > <? > $message=""; > break; > } > } > ************************* > can anyone see whats causing the problem > > kenny > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#47691) next »