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, ∼2994🔥, 0💬
Popular Posts:
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...
How to use the "@(...)" expression in Azure API Policy? The "@(...)" expression in Azure API Policy ...
How To Merge Cells in a Column? If you want to merge multiple cells vertically in a row, you need to...
How to use the XML to JSON Conversion Tool at freeformatter.com? If you want to try the XML to JSON ...