Posted by Janwillem Borleffs on 02/18/06 22:36
MrBiggles wrote:
> Here's something I've been wondering. Do most of you use single or
> double quotes as a string encapsultor?
>
Depends if there are variables which should be parsed:
$name = 'Joe';
$str = "His name is $name";
$str = 'His name is Joe';
Double-quoted strings are parsed, while single-quoted strings are taken
literally (= faster).
JW
Navigation:
[Reply to this message]
|