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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to