diff options
author | tiyowan <tiyowan@gmail.com> | 2012-03-15 18:53:07 +0100 |
---|---|---|
committer | tiyowan <tiyowan@gmail.com> | 2012-03-15 18:53:07 +0100 |
commit | 5511fbfd8f3054049037124059487096c9c9dde9 (patch) | |
tree | 7f4b0674fd810cd79b727c3a96c012bc739ce7bd | |
parent | dd63b0fec2b46de11e2f21ab7369ee66a446698b (diff) |
Add strip_slashes() to string helper documentation
-rw-r--r-- | user_guide_src/source/helpers/string_helper.rst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index dc70e461a..2d23fb00c 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -108,6 +108,36 @@ found in http://. Example $string = "http://example.com//index.php"; echo reduce_double_slashes($string); // results in "http://example.com/index.php" +strip_slashes() +=============== + +Removes any slashes from a string. Example + +:: + + $str = "Is your name O\'reilly?"; + echo strip_slashes($str); // results in Is your name O'reilly? + +You can also use an array. Example + +:: + + $str = array( + 'question' => 'Is your name O\'reilly?', + 'answer' => 'No, my name is O\'connor.' + ); + + $str = strip_slashes($str); + +The above will return the following array: + +:: + + array( + 'question' => "Is your name O'reilly?", + 'answer' => "No, my name is O'connor." + ); + trim_slashes() ============== |