timezone_identifiers_list() function ~ Print Timezones List in PHP

Date Published: 08/04/2020 Published By: JaiSchool

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


$all_timezones = timezone_identifiers_list();
foreach($all_timezones as $timezones)
	echo $index.". ".$timezones."<br>";

Publish A Comment

Leave a Reply

Your email address will not be published.