title: Can I write PHP inside JavaScript inside PHP?
body: <p>Inside a PHP script I have this:</p>
  
  <pre><code>echo &lt;&lt;&lt;EOD
  
  &lt;script type="text/javascript"&gt;
  document.getElementById('my_element_id').innerHTML='Do stuff';
  &lt;/script&gt;
  
  EOD;
  </code></pre>
  
  <p>Can I add PHP inside the JavaScript? Replace the "Do stuff" part with PHP code? If yes, how do I do it?</p>