Re: [PHP] Session: I RTFM

2002-12-15 Thread michael kimsal
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

Re: [PHP] Session: I RTFM

2002-12-15 Thread Marco Tabini
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

Re: [PHP] Session: I RTFM

2002-12-14 Thread Justin French
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

Re: [PHP] Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
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

Re: [PHP] Session: I RTFM

2002-12-14 Thread Marco Tabini
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