note 53655 added to function.empty
| From: | Kouenny at osu1 dot php dot net | Date: | Wed, 08 Jun 2005 13:45:29 +0000 |
| Subject: | note 53655 added to function.empty | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90115@lists.php.net to get a copy of this message | ||
In response to "admin at ninthcircuit dot info" :
Instead of using "$spaces = str_replace(" ",""," ");"
you should use the function "trim()", which clear spaces before and after the string. e.g.
"trim(' example 1 ')" returns "example 1".
----
Manual Page -- http://www.php.net/manual/en/function.empty.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53655
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53655&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53655&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53655&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53655&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53655&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53655&report=yes
Search -- http://master.php.net/manage/user-notes.php