note 125698 deleted from function.getdate by cmb
| From: | cmb@php.net | Date: | Tue, 19 Jan 2021 23:28:11 +0000 |
| Subject: | note 125698 deleted from function.getdate by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-216197@lists.php.net to get a copy of this message | ||
Note Submitter: makdev at motleymix dot net
----
Regarding
getdate(); manual page
https://www.php.net/manual/en/function.getdate.php
Worth mentioning is what type of array is returned by the function getdate() and a better method to
print out the array so that keys and values are properly displayed.
getdate() returns an associate array
Code to loop through it and display key/value pairs:
<?php
$arr_thisdate = getdate();
foreach($arr_thisdate as $key=>$key_value)
{
echo "</br>Key = " . $key . ", Value = " . $key_value;
}
?>