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, 1488🔥, 0💬
Popular Posts:
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
How To Remove Slashes on Submitted Input Values in PHP? By default, when input values are submitted ...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
What are "*..." and "**..." Wildcard Parameters in Function Definitions? If you want to define a fun...