note 125698 added to function.getdate
| From: | makdev at motleymix dot net | Date: | Tue, 19 Jan 2021 22:47:28 +0000 |
| Subject: | note 125698 added to function.getdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216195@lists.php.net to get a copy of this message | ||
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;
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.166 (proxied: 77.96.77.209)
----
Manual Page -- http://php.net/manual/en/function.getdate.php
Edit -- https://master.php.net/note/edit/125698
Del: integrated -- https://master.php.net/note/delete/125698/integrated
Del: useless -- https://master.php.net/note/delete/125698/useless
Del: bad code -- https://master.php.net/note/delete/125698/bad+code
Del: spam -- https://master.php.net/note/delete/125698/spam
Del: non-english -- https://master.php.net/note/delete/125698/non-english
Del: in docs -- https://master.php.net/note/delete/125698/in+docs
Del: other reasons-- https://master.php.net/note/delete/125698
Reject -- https://master.php.net/note/reject/125698
Search -- https://master.php.net/manage/user-notes.php