timezone_identifiers_list() function ~ Print Timezones List in PHP

The function timezone_identifiers_list() returns an array that contains all the timezone (almost 426). So you can print them by accessing indexing numbers.

Here I am going to print all the timezone with the help of a loop. See example below.

Print all the timezone list using foreach() loop

<?php

$index=1;
$all_timezones = timezone_identifiers_list();
foreach($all_timezones as $timezones)
{
	echo $index.". ".$timezones."<br>";
	$index++;
}
?>

Leave a Comment