• PHP Video Tutorials

PHP - Function addslashes



Syntax

string addslashes ( string $str ) 

Definition and Usage

It returns the string with blackslashes in front of predefined characters

Return Values

It returns the escaped string

Parameters

Sr.No Parameters & Description
1

str

This string to be escaped

Example

Try out the following example

<?php
   $str = "Is your name sai Right?";
   echo addslashes($str);
?>
php_function_reference.htm
Advertisements