The following example is about timezone_identifier_list function used for returning timezone identifiers.
The following example is about timezone_identifier_list function used for returning timezone identifiers.timezone_identifiers_list alias DateTimeZone::list Identifiers function returns numerically index array with all timezone identifiers
Description on PHP Timezone Identifier List
staticarray DateTimeZone::listIdentifiers ([ int $what = DateTime::ALL [, string $country = NULL ]] )
array timezone_identifiers_list ([ int $what = DateTime::ALL [, string $country = NULL ]] )
Parameters of timezone_identifiers_list() Function PHP
what - One of DateTimeZone class constants, defaults to DateTimeZone::ALL.
country - A two-letter ISO 3166-1 compatible country code.
(The parameter option country is only used when what is set to DateTimeZone::PER_COUNTRY.)
Return Values
Returns array on success or FALSE on failure.
Examples of timezone_identifiers_list() Function PHP
<?php
$timezone_identifiers = DateTimeZone::listIdentifiers();
for ($i=0; $i < 5; $i++) {
echo "$timezone_identifiers[$i]\n";
}
?>