note 45363 added to function.array-walk
| From: | Eierkoek at osu1 dot php dot net | Date: | Fri, 03 Sep 2004 13:46:05 +0000 |
| Subject: | note 45363 added to function.array-walk | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75983@lists.php.net to get a copy of this message | ||
normaly the $_GET array will add slashes to the array values. To remove all slashes in this array, i
created the folowing code
set_magic_quotes_runtime (0);
function StripAllSlashes (&$ArrayGET, $Value)
{
if (is_array ($ArrayGET)) array_walk ($ArrayGET, "StripAllSlashes");
else $ArrayGET = stripslashes ($ArrayGET);
}
if (isset ($_GET) && get_magic_quotes_gpc ()) array_walk ($_GET,
"StripAllSlashes");
I hope this code was usefull,
Eierkoek
----
Manual Page -- http://www.php.net/manual/en/function.array-walk.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45363
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45363&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45363&report=yes
Search -- http://master.php.net/manage/user-notes.php