Re: Help with mail...
| From: | Justin French | Date: | Mon, 23 Sep 2002 04:07:12 +0000 |
| Subject: | Re: Help with mail... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117234@lists.php.net to get a copy of this message | ||
strings in double quotes are evaluated looking for $vars and {$vars} to
substitute. strings with in single quotes are not evaluated for vars.
$var = "my favourite color is {$col}"; // works
$var = "my favourite color is $col"; // works
$var = 'my favourite color is $col'; // doesn't work
$var = 'my favourite color is ' . $col; // works
Same applies to strings within functions:
include('{$dir}/{$file}.inc') // doesn't work
include('$dir/$file.inc') // doesn't work
include($dir.'/'.$file.'.inc') // works
include("{$dir}/{$file}.inc") // works
include("$dir/$file.inc") // probably works
Nothing to do with arrays :)
HTH
Justin
on 23/09/02 1:52 PM, Chuck PUP Payne (payne@magidesign.com) wrote:
> Ok, that work. Why does the ' (quote) not make it work is it because it's an
> array? Any thanks John that got it work.
>