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
What is the usage of { } in string handling in php?how to compare strings in PHP?
How do you check if a variable is set or not in PHP?
How do I reverse a string in PHP?
How can I repeat a string variable several times?
