Tutorial for Double Quoted String

What is Double Quoted string?

In PHP, we can also define a string by wrapping it in a double quote. However, double quote PHP strings will be used to evaluate escape sequences and variables.

How to Create Strings Using Double Quoted with Example.

When compared to single quotes, double quotes are utilised to build more complicated strings.

Variable names can be enclosed in double quotations, and the values of those variables will be displayed.

Consider the following scenario.

Example 1:-

Output:

Hello text within double quote

Example 2:-

Output:

Parse error: syntax error, unexpected 'quote' (T_STRING) in C:\wamp\www\string1.php on line 2

Example 3:-

Output:

Hello text multiple line text within double quoted string 
Using double "quote" with backslash inside double quoted string 
Using escape sequences in double quoted string

Example 4:-

Output:

Number is: 10

Tagged : / / / / / / /