PHP String - What Are the Special Characters You Need to Escape in Double-Quoted Stings
Interview Question Database For Software Developers
|
|
| What Are the Special Characters You Need to Escape in Double-Quoted Stings | | What Are the Special Characters You Need to Escape in Double-Quoted Stings? - PHP Script Tips - Understanding String Literals and Operations | | By: FYIcenter.com | There are two special characters you need to escape in a double-quote string: the double quote (")
and the back slash (\). Here is a PHP script example of double-quoted strings:
<?php
echo "Hello world!";
echo "Tom said: \"Who's there?\"";
echo "\\ represents an operator.";
?>
This script will print:
Hello world!Tom said: "Who's there?"\ represents an operator.
| | ID: 409 | Rank: 1085 | Votes: 0 | Views: 36 | Submitted: 20070420 |
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|