When in PHP, a double quote (") marks the start or end of a string (line of text). When you want to use a double quote in a string, you will have to tell PHP that you are not using the double quote to end or start the string, but that it has to be part of the string itself. Do to so, you just have to add a slash before the double quote and PHP understands.
echo "your name is "jimmy"!"; // wrong, will result in an error
echo "your name is \"jimmy\"!"; // right, will give us: your name is "jimmy"
__________________ Nunchaku! Who doesn't like martial arts? =)
The Following User Says Thank You to Jim For This Useful Post:
Thanks. I "thought" I understood that the \ character allowed the next character to not be literally taken (e.g., \n). However, I have now re-learned that it depends on the character, e.g., \" vs \t, etc.