0

I have three files a .php, a .html and a .js. How can I combine all three of them so that I can use the value of a variable set in php in JavaScript?

M. Bailey
  • 11
  • 2
  • 3

1 Answers1

0

I will have to save this file by .php extenstion

<html>
<head> </head>
<body>
 <?php
   // here I can write my php code ?> // I can end it any time to include some JS code here 
<script> Some js code</script>
<?php // and start again to write some more php code 
?>
</body>
</html>

Mitesh Pant
  • 524
  • 2
  • 15