PHP stripcslashes() Function
In this chapter you will learn:
- Definition for PHP stripcslashes() Function
- Syntax for PHP stripcslashes() Function
- Parameter for PHP stripcslashes() Function
- Return for PHP stripcslashes() Function
- Note for PHP stripcslashes() Function
- Example - Remove the backslash in front of "World!"
Definition
The stripcslashes() function removes backslashes added by the addcslashes() function.
Syntax
PHP stripcslashes() Function has the following syntax.
stripcslashes(string)
Parameter
Parameter | Is Required | Description |
---|---|---|
string | Required. | String to check |
Return
PHP stripcslashes() Function returns the unescaped string.
Note
This function can be used to clean up data retrieved from a database or from an HTML form.
Example
Remove the backslash in front of "World!":
<?php
echo stripslashes("Hello \World!");
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP stripslashes() Function
- Syntax for PHP stripslashes() Function
- Parameter for PHP stripslashes() Function
- Return for PHP stripslashes() Function
- Example - remove the slashes from string
Home » PHP Tutorial » PHP String Functions