Marco Tabini wrote:
Single quotes are normal strings. Double quotes are strings in which
substitutions can take place. For example:
Double quotes also expand escape strings (e.g."\n") whereas single
quotes don't.
However, in a case like this:
--
What is the difference between:
$f
Single quotes are normal strings. Double quotes are strings in which
substitutions can take place. For example:
Double quotes also expand escape strings (e.g."\n") whereas single
quotes don't.
Cheers,
Marco
--
php|architect - The Magazine for PHP Professionals
The monthly magazi
John,
PHP looks for "$vars or {$vars} to parse in the string" when double quotes
are used... whereas when single quotes are used, it won't parse/substitute
the vars.
So, when you're not using $vars, using single quotes will be marginally
faster... perhaps not important on small sites, but very
Marco (or anyone)
What is the difference between:
$familyname = getvar("familyname");
and
$familyname = getvar('familyname');
What do single quotes do, as a general rule, that double cannot (he asks remembering
something, but not sure what)?
Marco Tabini wrote:
> I haven't followed the rest
I haven't followed the rest of the thread, but how about using a
function?
function getvar ($varname)
{
if (isset ($_POST[$varname])
{
$_SESSION[$varname] = $_POST[$varname];
return $_POST[$varname];
}
elseif (isset ($_SESSION[$varnam
5 matches
Mail list logo