PHP: Acquiring Date Information with getdate()

seconds = 1
minutes = 6
hours = 19
mday = 20
wday = 1
mon = 8
year = 2018
yday = 231
weekday = Monday
month = August
0 = 1534817161

Today's date: 8/20/2018

Today's date: Monday, August 20th, 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>";

?>