I had just began to learn PHP and now I stumbled over a problem. In PHP and also in HTML, it is possible to use single and double quoted strings. In HTML, for example, I can write the following code:
Both lines are equivalent and the result on the screen is the same. The same is also in PHP. This gives me a headache and some confusing.
Is there something like a coding-guideline when and where I should use which of the quotations? And what's with quotations which are nested in other strings like the following:
?
What are the reasons why PHP supports two kinds of quotations? In other popular programming languages (C#, Delphi, C/C++, ...) this doesn't exist.