|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-06-27 22:34 UTC] Xuefer at 21cn dot com
PHP manual
getdate
(PHP 3, PHP 4 )
getdate -- Get date/time information
Description
array getdate ([int timestamp])
............
Example 1. getdate() example
$today = getdate();
$month = $today[month];
$mday = $today[mday];
$year = $today[year];
echo "$month $mday, $year";
---
-> $mday = $today[mday];
warnning: Use of undefined constant mday - assumed 'mday'
although a undefined constant will be assumed as a string, it's still a bad usage of this auto conversion.
php manual writers shouldn't make a bad guide for php learners
thx
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
OK, as you suggested dates are printed now. You can see, that nearly all files are autogenerated daily (dispite what I said before) except the CHM version (and the temp unavailable PDF). We will update the CHM versions soon. Anyway, this way the full table listing is **UGLY**. Is there anybody with a better layout tip? Ps. I used the RFC date type date('r", $changed) to be world wide compatible (though it is very long...).