Just go to w3schools.com and click on PHP
This will bring up the PHP Tutorial.
Scroll down about one page and click the green button that says “Try it yourself”
Now you will see a split screen with the code on the left and the results on the right.
We are going to change the code between the open tag: <?php
and the close tag: ?>
We are going to replace it with this:
date_default_timezone_set('America/New_York'); // this sets the timezone to EST
$myday=date('l'); // day of week eg Monday
$mydate=date('jS'); // day of month eg 1st
$mymonth=date('F'); // month name eg April
$myyear=date('Y'); // year eg 2025
$mytime=date('h:i A'); // time 11:11 AM
echo "It is now $myday $mydate of $mymonth $myyear $mytime";
and click the “Run” button and it should look like this:
More info:
https://www.php.net/manual/en/function.date.php
https://www.php.net/manual/en/function.date-default-timezone-set.php
I find w3Schools to be aa good place to get your toes wet, but it's not very up to date. I like PHP the right way. Got any other resources you can recommend?