Copyright © tutorialspoint.com
|
array timezone_identifiers_list ( void ) array DateTimeZone::listIdentifiers ( void ) |
These functions return numerically index array with all timezone identifiers.
The above two functions are equivalent and any of the functions can be used as shown below in the example.
| Parameter | Description |
|---|---|
| void | NA |
Returns array on success or FALSE on failure.
Following is the usage of this function:
<?php
$timezone_identifiers = DateTimeZone::listIdentifiers();
for ($i=0; $i < 5; $i++) {
echo "$timezone_identifiers[$i]\n";
}
echo "-------------------------------------------------\n";
$timezone_identifiers = timezone_identifiers_list();
for ($i=0; $i < 5; $i++) {
echo "$timezone_identifiers[$i]\n";
}
?>
|
This will produce following result:
Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara ------------------------------------------------- Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara |
Copyright © tutorialspoint.com