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:
Origins 2008 – The Fork Begins MySQL AB had been acquired by Sun Microsystems in…
Useful functions built into PHP You can display the entries in an array with the…
Variables are essential to writing code in PHP. Variables always start with the dollar sign…
WampServer, a Windows web development environment. This only runs on Windows computers but it is…
XAMPP a local environment for web development. Setting up XAMPP (which stands for X (Cross-Platform),…
MySQL was created in 1994 by Swedish developers David Axmark and Allan Larsson, along with…