PHP: Acquiring Date Information with getdate()

seconds = 42
minutes = 40
hours = 10
mday = 13
wday = 4
mon = 12
year = 2018
yday = 346
weekday = Thursday
month = December
0 = 1544722842

Today's date: 12/13/2018

Today's date: Thursday, December 13th, 2018

<?php
$date_array =  getdate(); // no argument passed so today's date will be used
foreach ( $date_array as $key => $val ) {
    print ( "$key = $val<br />";
}
    
?>
<hr />

<?php
print "Today's date: ".$date_array['mon']."/".$date_array['mday']."/".$date_array['year']."<p>";
print "Today's date: ".$date_array['weekday'].", ".$date_array['month']." ".$date_array['mday']."th, ".$date_array['year']."<p>";

?>