Creating a Dynamic Page ΒΆ
<?php
print("Hello world!");
Why the <?php
? So you can do this:
<html>
<body>
<p>
<?php
print("Hello, it’s " . date('Y-m-d'));
?>
</p>
</body>
</html>
There are syntax shortcuts available for something so simple though:
<html>
<body>
<p>Hello, it’s <?=date('Y-m-d')?></p>
</body>
</html>