getdate(): Hours of the day : getdate « Development « PHP






getdate(): Hours of the day


<?php
$date_array = getdate(); 
foreach ( $date_array as $key => $val ){
    print "$key = $val<br>";
}
print "Today's date: $date_array[hours]";
?>

           
       








Related examples in the same category

1.getdate(): Seconds past the minutes
2.getdate(): Minutes past the hour
3.getdate(): Day of the month
4.getdate(): Day of the week
5.getdate(): Month of the year
6.getdate(): Year (4 digits)
7.getdate(): Day of year
8.getdate(): Day of the week (name)
9.getdate(): Month of the year (name)
10.getdate(): Timestamp
11.Acquiring Date Information with getdate()