On Mon, March 26, 2007 10:17 am, Ross wrote:
> I want to trim any whitepace and check if it is empty in the same
> line this
> is not working.
>
> if (empty(trim($_POST['_createcategory']))) {
Define "not working" if you would...
Personally, I always use isset() to determine if any POST data was
On Mon, 2007-03-26 at 16:23 +0100, Stut wrote:
> Ross wrote:
> > I want to trim any whitepace and check if it is empty in the same line
> > this
> > is not working.
> >
> > if (empty(trim($_POST['_createcategory']))) {
>
> You can't do this because empty needs the variable - it can't work on
Brad Bonkoski wrote:
Ross wrote:
I want to trim any whitepace and check if it is empty in the same
line this is not working.
if (empty(trim($_POST['_createcategory']))) {
perhaps try:
if( strlen(trim($_POST['...']))) <= 0 ) { ... }
don't think empty is the right function for this...
-Br
Ross wrote:
I want to trim any whitepace and check if it is empty in the same line this
is not working.
if (empty(trim($_POST['_createcategory']))) {
You can't do this because empty needs the variable - it can't work on
teh return value. The closest you can get would be...
if (isset($_PO
Ross wrote:
I want to trim any whitepace and check if it is empty in the same line this
is not working.
if (empty(trim($_POST['_createcategory']))) {
perhaps try:
if( strlen(trim($_POST['...']))) <= 0 ) { ... }
don't think empty is the right function for this...
-Brad
--
PHP General M
I want to trim any whitepace and check if it is empty in the same line this
is not working.
if (empty(trim($_POST['_createcategory']))) {
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
6 matches
Mail list logo