Thanks everyone! I did end up printing out the <script language="JavaScript1.2"> within HTML and outside the php, and that seems to work fine. The HTMLSpecialChars also seems like a good idea!

All the other JavaScript commands seemed to show up OK within PHP echo commands as long as I remembered to escape all the semicolons and quotation marks.

I'm very new to JavaScript and PHP (more familiar with Perl).

If anyone wants to see the script you all helped me finish up, it's a form that will let someone generate JavaScript code for a text-based countdown (how many days are left until....) based on a future date.

Thank you all again!!!