damon2003
12-16-2003, 07:11 AM
Hi,
what the difference between using single quotes or double quotes. I.e.
$_SESSION["yoursessionvariable"]);
or
$_SESSION['yoursessionvariable']);
thanks
clairec666
12-16-2003, 07:13 AM
Prrobably absolutely no dofference. But don't quote me on it!
In that example, very little. In PHP, with double quotes, it has variable interpolation (ie. variables will be read as their values in double quotes strings).
For most array indecies, you will probably want to use single quotes, as they are a set, known value, and you do not pass a variable to it.
Take this example:
$foo = "blah";
echo "This is a $foo test"; # outputs This is a blah test
echo 'This is a $foo test'; # outputs This is a $foo test