Example
Print all timezones in Africa:
html
<?php
print_r(timezone_identifiers_list(1));
?>
Definition and Usage
The timezone_identifiers_list() returns an indexed array containing all timezone identifiers.
Syntax
text
timezone_identifiers_list(what, country)
Parameter Values
| Parameter | Description |
|---|---|
| what | Optional. Specifies a DateTimeZone class constant1 = AFRICA2 = AMERICA4 = ANTARCTICA8 = ARCTIC16 = ASIA32 = ATLANTIC 64 = AUSTRALIA128 = EUROPE256 = INDIAN512 = PACIFIC1024 = UTC2047 = ALL4095 = ALL_WITH_BC4096 = PER_COUNTRY |
| country | Optional. Specifies a two-letter ISO 3166-1 compatible country code |
Technical Details
| Return Value: | Returns an indexed array on success. FALSE on failure |
|---|---|
| PHP Version: | 5.2+ |
| PHP Changelog: | PHP 5.3: The optional what and country parameters were added |