I need to write some PHP code inside a Javascript\'s \"document.write()\". This is a dummy example, but in the future Javascript will generate automatically tha
If you need to execute some PHP code via javascript, you would need to have the PHP housed on a server somewhere where it can be run (i.e. the browser client will not run it) and then you need to used AJAX to run that script and do whatever you need to do with its output.