03c04-3.php
来自「介绍PHP5的给类型函数应用」· PHP 代码 · 共 15 行
PHP
15 行
<?php// Set the default timezone to US/Eastern time:date_default_timezone_set('US/Eastern');// Create our own lookup table relative to US/Eastern$locals = array('Seattle' => -3, 'London' => 5, 'Tokyo' => 14);// Produce the day and time in these locals, based upon localtime:$now = time();foreach ($locals as $place => $offset) { // Output the day and time only, after converting echo "<p>The time in {$place} is ", date('m/d/Y H:i', $now + 3600 * $offset) ,'</p>';}?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?