Difference Between Single Quotes and Double Quotes in Tabular Form

Sno.Basic TermSingle QuotesDouble Quotes
1.Programming languagePhpPhp
2.DefinitionIn Php simplest way to specify a string is to
enclose it in single quotes (the character ‘).
PHP will interpret the following escape sequences for special characters
3.Syntaxecho ‘a simple string’;echo “a simple string”;
4.Variableecho ‘a simple string’.$variable.’number’;echo “a simple string $variable number”
5.Working / Output

 

(Visited 13 times, 1 visits today)

Written by: