how to write php code in javascript function 28 How To Write Php Code In Javascript Function 11/12/2011 · You can't run PHP code with Javascript. When the user recieves the page, the server will have evaluated an… Written By Anonymous Saturday, June 18, 2022 Add Comment Edit