Ed Walsh Development
Member login
- Hello, Guest
- Log in
I did this in a current site today and thought it was worth jotting down. Its a really good start point in learning Php as it can be displayed using one line of code below.
This will only work on pages if your file is PHP is enabled .php, you can change a HTML page to have a .php extension
<? print(Date("l F d, Y")); ?>
The scripts starts by opening up the PHP code with the <? symbols.
then, it uses the print function to send the date it is about to generate to the browser. The date function is then used to create today's date.
Finally, the PHP script is closed using the ?> symbols.
To read more about the date function take a look here.
