Quote:
Originally Posted by Rakuli
A pedantic point but when you're echoing html with PHP it is better (faster) to use single quotes unless you plan to embed variables in them.
With single quotes php will simply output the text but with double quotes it checks the whole string to see if anything needs interpreting before outputting.
As pa007 says you do have to escape single quotes with \'
Cheers.
|
I had some trouble escaping the single qoutes when I echoed
html the backslash appeared in the
html along with the single quotation. I removed the backslash and it was ok after that. I read a bit about it here:
http://www.tizag.com/phpT/echo.php
Will it cause problems across other browsers without escaping. i am currently using firefox.
Chris