Using backslash when echo quotation marks

Sometimes you’ll see quotation marks in a string that represent exact language that has come from somebody else. The quotation mark is also used to designate speech acts in fiction and poetry. For example: Mr. Douglas, who was working in his field that morning, said, “The alien spaceship appeared right before my own eyes.”

In this case, if you want to echo this string out on a php page, you will have to add a backslash in front of each quotation mark to ensure that it will appear on the html page.

echo "<P>Mr. Douglas, who was working in his field that morning, said, \”The alien spaceship appeared right before my own eyes.\”</P>";