Forum : What Are the Special Characters You Need to Escape in Single-Quoted Strings?
Brief description  about Online courses   join in Online courses
View Manju  S Reddy 's Profile

What Are the Special Characters You Need to Escape in Single-Quoted Strings?

Special Characters You need to escape in single-quoted string.....
Asked by Manju S Reddy | Mar 17, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Manjunath,
There are two special characters you need to escape in a single-quote string: the single quote (') and the back slash (\). Here is a PHP script example of single-quoted strings.
Example:
<?php
echo "Hello Anand !";
echo "It\'s Sunday !";
echo "\\ represents an operator.";
?>
OUT PUT:
Hello Anand!It's Friday!\ represents an operator.
Mar 17, 2010