I am currently considering whether which is better in terms of coding style when outputting html, single or double quotes?
If we take aside the performance issue it seems to me that single quotes result to easier to read code eg:
print"<a href='$PHP_SELF'>this is the link</a>";
It does translate the variable to its value, you don't need to escape quotes, special characters like \n are understood and so on.
The only thing that makes me have second thoughts is that from what I understand double quotes are the official way of enclosing attributes. Single quotes will work but this may depend on the standard (eg XHTML?).
Any views on this? confused:
Savvas: