Hallo franxx!
was meinst du mit "umgebender Teil"?
s. dedlfix: Das ist doch kein reines HTML, sondern entweder ein JS-writeln oder in PHP-echo. Also hast du außendrum nochmal Hochkommas, sind es einfache Hochkommas, unterdrücken sie das Escapen.
Ja, siehe meinen ersten Post.
PHP echo schreibt JavaScript document.write, also
<?php
$JavaScript = '<script type="text/javascript">/* <![CDATA[ */document.write("<input type=\'button\' name=\'test2\' id=\'test2\' value=\'button 2\' title=\'information 2\' onclick=\"Test2(\'Hello World!\');\" /><br />");/* ]]> */</script><noscript><p>JavaScript <strong>not</strong> active (#2).</p></noscript>';
echo $JavaScript;
?>
mfg Alfie