HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Date/Time Reference : Print local time as an indexed and as an associative array
The localtime() function returns the local time.
Parameter | Description |
---|---|
timestamp | Optional. Specifies a Unix timestamp that defaults to the current local time, time(), if no timestamp is specified |
is_assoc | Optional. Specifies whether to return an associative or indexed array. FALSE = the array returned is an indexed array. TRUE = the array returned is an associative array. FALSE is default.
The keys of the associative array are:
|
Return Value: | Returns an array that contains the components of a Unix timestamp |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.1: Now issues E_STRICT and E_NOTICE time zone errors |
❮ PHP Date/Time Reference