Thursday, November 24, 2016

Single Quote (' ') vs Double Quotes (" ")

Double quotation marks allow the parsing of variables.

Example

$name='"Chee"
print "Hello, $name ;  // Hello Chee

If you use a Single Quotation marks to enclose the same string, the variable is not substituted.

Example

$name="Chee"
print 'Hello, $name'  ;  // Hello, $name

No comments:

Post a Comment