PHP: Acquiring Date Information with getdate()

seconds = 54
minutes = 30
hours = 15
mday = 17
wday = 3
mon = 7
year = 2019
yday = 197
weekday = Wednesday
month = July
0 = 1563402654

Today's date: 7/17/2019

Today's date: Wednesday, July 17th, 2019

<?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>";

?>