PHP: Acquiring Date Information with getdate()

seconds = 45
minutes = 39
hours = 19
mday = 17
wday = 3
mon = 10
year = 2018
yday = 289
weekday = Wednesday
month = October
0 = 1539830385

Today's date: 10/17/2018

Today's date: Wednesday, October 17th, 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>";

?>