What is the difference between single quoted string and double quoted string?



What is the difference between single quoted string and double quoted string?..

Answer / Vibhuti Narayan Patel

In PHP, there are two types of string delimiters: single quotes ('') and double quotes (""). Single-quoted strings allow only a single backslash escape sequence (e.g., '), while double-quoted strings allow more complex escape sequences such as
for new line, for tab,
for carriage return, ' for single quote, and " for double quotes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Why do we use htaccess and where?

1 Answers  


How can we connect to a mysql database from a php script?

1 Answers  


What is better .net or php?

1 Answers  


How many ways to include array elements in double-quoted strings using php?

1 Answers  


How to download files from an external server with code in php?

1 Answers  


Explain the casts allowed in PHP?

1 Answers  


What is include in php?

1 Answers  


What are the different methods of passing data or information between two calls of a web page? What are the advantages/disadvantages of these methods?

4 Answers   Ardo, Patni,


What are escaping characters?

1 Answers  


What is the default time in seconds for which session data is considered valid?

1 Answers  


What is .htaccessfile and use of this file

5 Answers  


How to open standard output as a file handle?

1 Answers  


Categories