Re: validating textarea using php
| From: | Shawn McKenzie | Date: | Tue, 13 May 2008 20:50:56 +0000 |
| Subject: | Re: validating textarea using php | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274275@lists.php.net to get a copy of this message | ||
Dan Joseph wrote:
On Tue, May 13, 2008 at 12:02 PM, Usamah al-Amin <usamah1228@gmail.com> wrote:-ShawnThere 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. Or just use trim() :-)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