<option value="Bob's Weekend">Bob's Weekend</option>
I am stumped. The apostrophe is confusing the script and myself. How could I echo this in PHP?
echo '<option value="Bob's Weekend">Bob's Weekend</option>'; //syntax error
echo '?><option value="Bob's Weekend">Bob's Weekend</option><?php ';?> //syntax error
First, you could just drop out of PHP and put in literal HTML:
Second, you could use backslashes:
or
Finally, you could use a here-document:
I would go with the first option, myself. It seems a bit silly to do
echo‘s in PHP code when all you have to do is drop back out of the PHP and everything is echoed automatically.