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, ∼2851🔥, 0💬
Popular Posts:
How to use the "set-body" Policy Statement for an Azure API service operation? The "set-body" Policy...
What is Azure API Management Publisher Dashboard? Azure API Management Publisher Dashboard is an Azu...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...
How to troubleshoot the Orderer peer? The Docker container terminated by itself. You can follow this...
How to create a navigation file like navigation.xhtml for an EPUB 3.0 book? At least one navigation ...