MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Tutorial for Double Quoted String

php

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

Ashwani Kumar
Latest posts by Ashwani Kumar (see all)
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x