note 52212 added to function.stripslashes
| From: | marijn78 at hotmail dot com | Date: | Sun, 24 Apr 2005 16:50:17 +0000 |
| Subject: | note 52212 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88496@lists.php.net to get a copy of this message | ||
If you have a string which might be null it won't be null anymore after you do a stripslashes.
$s = null;
$r = stripslashes($s);
if ($r == "") echo "this is the result";
if (is_null($r)) echo "instead of this";
It took me some time to figure this out it might safe you some time.
----
Manual Page -- http://www.php.net/manual/en/function.stripslashes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52212
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52212&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52212&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52212&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52212&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52212&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52212&report=yes
Search -- http://master.php.net/manage/user-notes.php