Thursday, April 1, 2010

initialize a variable in single quote and double quote

If the variable is declared in the double quote the variable will be parsed by php

if it is declared in single quote means it will not be parsed by php

so initializing a variable a single quote is always better.

Also we can add variable inside the double quote

example

$a ="this is $var allphpinterviewquestions";

No comments:

Post a Comment