This will get you started writing in PHP.
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”;
Then click the “Run” button and it should look like this:

More info:
Leave a Reply
You must be logged in to post a comment.