note 96298 added to datetimezone.listidentifiers
| From: | chema at garridodiaz dot com | Date: | Fri, 19 Feb 2010 10:50:47 +0000 |
| Subject: | note 96298 added to datetimezone.listidentifiers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166171@lists.php.net to get a copy of this message | ||
I use this time zone select:
<select id="TIMEZONE" name="TIMEZONE">
<?php
$timezone_identifiers = DateTimeZone::listIdentifiers();
foreach( $timezone_identifiers as $value ){
if ( preg_match(
'/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $value ) ){
$ex=explode("/",$value);//obtain continent,city
if ($continent!=$ex[0]){
if ($continent!="") echo '</optgroup>';
echo '<optgroup label="'.$ex[0].'">';
}
$city=$ex[1];
$continent=$ex[0];
echo '<option
value="'.$value.'">'.$city.'</option>';
}
}
?>
</optgroup>
</select>
----
Server IP: 69.147.83.197
Probable Submitter: 80.174.207.83
----
Manual Page -- http://www.php.net/manual/en/datetimezone.listidentifiers.php
Edit -- https://master.php.net/note/edit/96298
Del: integrated -- https://master.php.net/note/delete/96298/integrated
Del: useless -- https://master.php.net/note/delete/96298/useless
Del: bad code -- https://master.php.net/note/delete/96298/bad+code
Del: spam -- https://master.php.net/note/delete/96298/spam
Del: non-english -- https://master.php.net/note/delete/96298/non-english
Del: in docs -- https://master.php.net/note/delete/96298/in+docs
Del: other reasons-- https://master.php.net/note/delete/96298
Reject -- https://master.php.net/note/reject/96298
Search -- https://master.php.net/manage/user-notes.php