Tools, FAQ, Tutorials:
Escape Sequences in Single-Quoted Strings in PHP
How Many Escape Sequences Are Recognized in Single-Quoted Strings?
✍: FYIcenter.com
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:
<?php echo 'Hello world!'; echo 'It\'s Friday!'; echo '\\ represents an operator.'; ?>
This script will print:
Hello world!It's Friday!\ represents an operator.
⇒ "new line" Character in Single-Quoted Strings in PHP
⇐ Understanding PHP String Literals and Operations
2016-10-13, ∼2239🔥, 0💬
Popular Posts:
How To Protect Special Characters in Query String in PHP? If you want to include special characters ...
How to decode the id_token value received from Google OpenID Connect authentication response? Accord...
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...