![]() |
The stripcslashes() is an inbuilt function in PHP that is used to remove backslashes that were added to escape certain characters in a string. It reverses the effect of the addslashes() function. It recognizes the C-language characters, like \n, \r …, octal and hexadecimal representations. Syntaxstripcslashes(string $string): string; ParameterThis function accepts only single parameter which is described below:
Return ValueThe stripcslashes() function returns the escaped string from the unescaped string. Program 1: The following program demonstrates the stripcslashes() Function. PHP
Output
Escaped String: This is an example with \'escaped\' characters.<br>. Original String: This is an example with 'escaped' characters. Program 2: The following is another program that demonstrates the stripcslashes() Function. PHP
Output
String was escaped and then unescaped: This is an example with 'escaped' characters. Reference: https://www.php.net/manual/en/function.stripcslashes.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 11 |