0
I know that javascript and a clinte side language which is interpreted by the client’s browser and which PHP is a server side language interpreted by the server but a code is possible javascript be used within a code PHP I’ll leave a page as an example.
<html>
<body>
<h1>Javascript & PHP</h1>
<script>
x = 1;
</script>
<?php
echo($x)
?>
</body>
</html>
See also http://answall.com/q/89802/101
– Maniero
interesting is that with the python print() function it is also possible to generate javascript code?
– user45474
This way you exemplified is not possible... you can use php to generate javascript code as @bigown commented or you can use Xmlhttprequest to search for information from a php code. The following is documentation on Xmlhttprequest: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
– Raphael Rosa