+ 2
Is there big difference between single quotes and double quotes while we are using echo in php?
echo "$a"; echo '$a'; echo $a; echo ($a);
1 Answer
+ 7
the first scenario
echo("$a"); checks if there is a variable called $a....if not it outputs "$a" as string and if there is a variable outputs the variables value
the second
echo('$a'); states that output $a as string regardless of whether there is a variable $a!
the third
echo($a); searches for a variable $a and outputs it value
the fourth performs the same crap as the third