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 ([EMAIL PROTECTED]) 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.
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php