1.

What is an escape sequence? Name three commonly used escape sequences.

Answer»

Escape sequences It is a character preceded by a back slash(\)

 Operator   Definition       Example  Output
\”To print “echo TPHPY”’“PHP”
\’To print ‘echo”XYian”X’ian
\nNew lineecho “BVM \nHSS”BVM HSS
\tTo print tabecho”BVM\tHSS”BVM HSS
\rPrint carriage return
\$To print Secho “100\$”100$
\\To print\echo’’\\n is used as new line”\n is used as new line


Discussion

No Comment Found