Re: [PHP] validating textarea using php

[email protected] ("Dan Joseph")
Newsgroups php.general
Message-ID <[email protected]>
On Tue, May 13, 2008 at 12:02 PM, Usamah al-Amin <[email protected]>
wrote:

> >  if(chop($comments) == "") { ... }   //hope that helps.
>
> Well, chop() is an alias of rtrim(), so it won't work here for, say,
> trimming control characters at the end of the string like line feeds.
>
> trim() is actually the best bit here.
>
> Regards,
> Usamah
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
There is always using substr to mimic the Perl chomp() function.  Look thru
the comments on http://us.php.net/chop and you'll find a few different ways
of doing it.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month. Reseller plans and
Dedicated servers available.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.