It is kind of hard to give you exact advice with out seeing a segment of the code, but it souds as if you are trying to just output some text to the browser/client. Something like this should do it...
<?php
echo "<script language=\\"JavaScript\\" src=\\"file.js\\"></script>";
?>
whenever you want to directly output a " to the browser you must preced it with a \ or the escape charater.
PHPdev