How do I print the " in an echo statement?
<?php
echo "this will give a "parse error"";
?>
There are two ways around this. First you can simply enclose with single quotes instead.
The second option is to escape the quotes like this with a backslash:
<?php
echo "Relief at last, no dreaded \"parse errors\" in sight!";
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More strings PHP Questions
How do I join strings together?How do I check if a string contains HTML?
How do I make sure a string is a certain length?
How do I remove trailing whitespace?
How do I make the contents of a string lower case?
