why php escapes backslashes when using single quotes?
I’m trying to output \\ on a LaTex math code but the following code is outputting
\ instead of \\ even when using single quotes.
Is there anyway to do this instead of echoing \\\\? like any configuration file?
<?php
echo '\\';
?>
Difference between single or double quotes is only about parsing variables or not.
I’m really not sure if you can do what you want, it’s like asking if $ character could not be used as variable prefix in doubles quotes…
Maybe you should look at heredoc and nowdoc in http://php.net/manual/language.types.string.php