I don't know if you've noticed, Rich (et al), but I typically use single quotes for ALL strings that don't have a variable substitution within it in the examples that I post. The reason is that PHP does NOT perform variable or escape character substitution in single-quoted strings, so it speeds things up to use them when I know that no variable exists. The speed increase is due to the fact that PHP doesn't need to perform more sophisticated parsing of the string before outputting it.
Some caveats -- the only escaped characters that PHP handles in single-quoted strings are the single-quote and the backslash For example, the character sequence \n in the following string is output literally as "backslash-n", not as a newline.
echo 'Hello \n world.';
A more complicated example:
echo 'He said, \'what is the root directory?\' I replied \"It\'s C:\\.\"\n';
This prints:
He said, 'what is the root directory?' I replied \"It's C:\.\"\n
Notice that the backslashes before the double quote characters and the newline 'n' character are NOT parsed as escape characters -- they're printed as literal backslashes.
Take care,
Nik
http://www.bigaction.org/