How to echo script in php
<p>I am using the shortcode execute plugin in wordpress.</p>

<p>This simply allows me to write shortcode like this [email_spamproof]</p>

<p>But I am trying to echo a script. Please see below...</p>

<pre><code>&lt;?php

echo '&lt;script type="text/javascript"&gt;
    &lt;!-- 
    // spam protected email
    emailE=("enquiries@" + "example.co.uk")
    document.write('&lt;a title="E-mail Example" href="mailto:' + emailE + '"&gt;' + emailE + '&lt;/a&gt;')
     //--&gt;
    &lt;/script&gt;
    &lt;noscript&gt;
        &lt;span class="spam-protected"&gt;Email address protected by JavaScript. Please enable JavaScript.&lt;/span&gt;
    &lt;/noscript&gt;';

?&gt;
</code></pre>

<p><br /></p>

<p>Now you can probably see my problem already.</p>

<p>Usually when I echo stuff it goes like this... <code>echo 'hello';</code></p>

<p>And you break the string using the same apostrophes
- like this...<br /> <code>echo 'hello ' . php_name() . ' and friends'</code></p>

<p><strong>My Problem</strong></p>

<p>The script also uses a similar method by adding script variables into the string, but these script apostrophes will get confused as PHP apostrophes, and break the echoed string.</p>

<p>How can I avoid this?</p>

<p>Thanks</p>
