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, 1387👍, 0💬
Popular Posts:
Where to find tutorials on API Management Services at Azure Portal? Here is a list of tutorials to a...
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to a...
What validation keywords I can use in JSON Schema to specifically validate JSON Array values? The cu...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How To Read a File in Binary Mode in PHP? If you have a file that stores binary data, like an execut...