0

how I can summon php in javaScript code?

In the case of PHP I can to do this to summon JavaScript code and use vars of php in side to JavaScript code : <?php $var = "More..."; echo '<script type="text/javascript"> alert("Something '.$var.' "); </script>'; ?> How I can do it or something seem of inverse forme for example <script type="text/javascript"> var variable="More"; <?php echo "Something ".variable; ?> </script> I refer to do it the corret form. Thanks so much. greetings.

15th Jun 2018, 4:35 PM
Juan Carlos Ramirez
Juan Carlos Ramirez - avatar
1 ответ
+ 1
Did I understand you correctly that you want to execute php in the js tab in a web code ? If yes you may have a look here https://www.sololearn.com/discuss/1352446/?ref=app
17th Jun 2018, 5:20 PM
hans
hans - avatar