note 45000 added to function.empty
| From: | lukeathpaddotcom at osu1 dot php dot net | Date: | Mon, 23 Aug 2004 04:38:19 +0000 |
| Subject: | note 45000 added to function.empty | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75139@lists.php.net to get a copy of this message | ||
/**
* @return true if the param is not empty, false if the param is empty
*/
function blank($v)
{
$v = trim($v);
return empty($v);
}
This function is useful for validating website form content...
Because a string consisting of whitespace will not return true with empty()...
----
Manual Page -- http://www.php.net/manual/en/function.empty.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45000
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45000&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45000&report=yes
Search -- http://master.php.net/manage/user-notes.php