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
when javascript runs that means the response is showing to the browser not compiling the php code any more so as you are putting php code in javascript that means you want something from server than no other alternate but ajax.