Worked for me, but I had to make sure that $messagearray was in fact an array.
So wrap that block of code in this:

  if(is_array($messagearray) && sizeof($messagearray))
  {


  }

--Joe

On Mon, Apr 09, 2001 at 01:13:00AM +0100, 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]


/******************************************************************************\
 *                    Joe Stump - PHP/SQL/HTML Developer                      *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\******************************************************************************/

-- 
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