I have Mixed Code php + javascript Inside php file . I called the code inside this file by ajax .

Example of the php code

PHP Code:
echo "<script type='text/javascript'>

The problem is that PHP code is executed, but the JavaScript code is not executed .

Is there a solution for the implementation the two codes PHP + JS using ajax request