Menu
Hi all,
A simple way to embed JS into PHP is the following:
<?php
$a = 5;
echo “<html>n”;
echo “<body>n”;
echo “<script language=javascript>n”;
echo “document.write($a);n”;
echo “</script>n”;
echo “</body>n”;
echo “</html>n”;
?>
I’m looking for a ‘tidier’ way to do this. For instance, a way in which command ‘echo’ is not repeated so many times…
Comments welcome.
Ruben