[PHP-DOC] cvs: phpdoc /en/reference/strings/functions stripslashes.xml
vrana Mon Sep 5 08:54:08 2005 EDT Modified files: /phpdoc/en/reference/strings/functions stripslashes.xml Log: magic_quotes_sybase http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/stripslashes.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/strings/functions/stripslashes.xml diff -u phpdoc/en/reference/strings/functions/stripslashes.xml:1.5 phpdoc/en/reference/strings/functions/stripslashes.xml:1.6 --- phpdoc/en/reference/strings/functions/stripslashes.xml:1.5 Fri Sep 10 10:26:47 2004 +++ phpdoc/en/reference/strings/functions/stripslashes.xml Mon Sep 5 08:54:07 2005 @@ -1,5 +1,5 @@ - + @@ -20,6 +20,13 @@ Double backslashes (\\) are made into a single backslash (\). + + + If magic_quotes_sybase is + on, no backslashes are stripped off but two apostrophes are replaced by + one instead. + + An example use of stripslashes is when the PHP directive magic_quotes_gpc
[PHP-DOC] cvs: phpdoc /en/reference/strings/functions stripslashes.xml
vrana Fri Sep 10 10:26:47 2004 EDT Modified files: /phpdoc/en/reference/strings/functions stripslashes.xml Log: Strings were without slashes http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/stripslashes.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/strings/functions/stripslashes.xml diff -u phpdoc/en/reference/strings/functions/stripslashes.xml:1.4 phpdoc/en/reference/strings/functions/stripslashes.xml:1.5 --- phpdoc/en/reference/strings/functions/stripslashes.xml:1.4 Sun Aug 29 07:03:21 2004 +++ phpdoc/en/reference/strings/functions/stripslashes.xml Fri Sep 10 10:26:47 2004 @@ -1,5 +1,5 @@ - + @@ -65,7 +65,7 @@ } // Example -$array = array('f\'oo', 'b\'ar', array('fo\'o', 'b\'ar')); +$array = array("f\\'oo", "b\\'ar", array("fo\\'o", "b\\'ar")); $array = stripslashes_deep($array); // Output
[PHP-DOC] cvs: phpdoc /en/reference/strings/functions stripslashes.xml
aidan Sun Aug 29 07:03:22 2004 EDT Modified files: /phpdoc/en/reference/strings/functions stripslashes.xml Log: Added a second example which addresses a large amount of user notes about dealing with arrays http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/stripslashes.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/strings/functions/stripslashes.xml diff -u phpdoc/en/reference/strings/functions/stripslashes.xml:1.3 phpdoc/en/reference/strings/functions/stripslashes.xml:1.4 --- phpdoc/en/reference/strings/functions/stripslashes.xml:1.3 Thu Jul 24 04:48:10 2003 +++ phpdoc/en/reference/strings/functions/stripslashes.xml Sun Aug 29 07:03:21 2004 @@ -1,5 +1,5 @@ - + @@ -42,6 +42,57 @@ ]]> + + + + stripslashes is not recursive. If you want to apply + this function to a mutli-dimensional array, you need to use a recursive function. + + + + + Using stripslashes on an array + + + + &example.outputs; + + + + + + + For more information about "magic quotes", see get_magic_quotes_gpc. See also addslashes and