Okay, well if you truly are trying to output that PHP code, then you have to escape single quotes (whichever ones you use as delimiters - here you're using single quotes).
Example:
echo 'This isn't going to work!';
See the color-coding go haywire? Here's what you need to do:
echo 'Who said this isn\'t going to work? I\'ve escaped my quotes!';
Now, if you can't be bothered with escaping your quotes, you can always use the heredoc syntax:
echo <<<EndOfCode
"Woohoo!" I said.
I can use any type of 'quotes' I want without escaping them!
EndOfCode;
To read more about escaping quotes as well as the heredoc syntax, see this manual page: [man]string[/man]