I realized that I can have problems with single quotes in php arrays:
<?php
$lang = array(
'tagline' => 'Let's start your project',
"h1" => "About Me"
);
?>
So I changed it to double quotes:
<?php
$lang = array(
"tagline" => "Let's start your project",
"h1" => "About Me"
);
?>
Should I use “php quote escapes”, instead of what I just did?
(by the way how to write “php quote escapes”?)
First of all, some people will say that simple-quoted strings are faster that double-quoted strings ; you should not care about that kind of micro-optimization : it will not make any difference for your application.
The difference between simple-quoted and double-quoted strings is :
\n,\t, …For reference, in the PHP manual :
I would that that, in the general matter, it’s mostly a matter of personnal preferences…
Personnaly, in a situation such as the one you described, I would use a double-quoted string, like you did : it make the code easier to both write and read, as you don’t have to escape that quote.