PHP addslashes() FunctionPHP addslashes() function is used to return a quote string with slashes. It works with some characters:
Syntax:
Example 1Output: Your string is :What does "WHO" mean? By using addslashes() function the result isWhat does \"WHO\" mean? Example 2Output: Who's the father of PHP? This is not safe in a database query. Who\'s the father of PHP? This is safe in a database query. Example 3Output: Wow' PHP? A use case of addslashes() is escaping the abovementioned characters in a string that is to be evaluated by PHP:Example 4Output: Is The Father of PHP\'Rasmus? Next TopicPHP String |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India