Difference Single Quotes('') and Double Quotes("")


According to Output string there are two of types of string in php


1. processed string : Denoted ""


2. Unprocessed String (raw string): ''


Invalid Case:


" " inside " " invalid X Manage using escape Operator


' ' inside ' ' invalid X using escape operator


" " inside ' valid


' ' inside " " valid



Processed String : 

processed string : "" each character is first processed then sent to output stream.


1. varibles inside "  " are processed then printed

2. escape character sequence inside (\n,\t,\r,.....) are processed 


Unprocessed String ( Row String ) :

raw string : '' No processing each character printed as it is directly flush to output stream.


1. varible itself is printed

2. escape character sequence inside (\n,\t,\r,.....) are not  printed as it is.



Common behaviour:

if you try to use <html> tags inside "" or '' it is treated as string for printing html you can use any '' or "" qoutes no issue at all.


Difference Single Quotes(' ') and Double Quotes(" ")