【发布时间】:2015-08-05 06:09:19
【问题描述】:
我刚刚将电话号码转换为时区转换器,结果显示为:
Requested Phone No.: +1 732 78782722
Country: United States
预期地区:纽瓦克、新不伦瑞克
Timezone: America/New_York
Date: 2015-08-05
Time: 01:51:03 am
我想要做的是将所有这些输出放在一行中。 这是我的输出代码
if(!empty($record['country_name'])) {
$this->display('<strong>Country:</strong> ' . $record['country_name']);
}
if(!empty($record['city'])) {
$this->display('<strong>Expected Region:</strong> ' . $record['city']);
}
//echo json_encode($date);
if(!empty($record['zone_name'])) {
$this->display('<strong>Timezone:</strong> ' . $record['zone_name']);
$this->display('<h2><strong>Date:</strong> ' . date('Y-m-d') . '</h2>');
$this->display('<h2><strong>Time:</strong> ' . date('H:i:s a') . '</h2>');
}
感谢您的帮助。
【问题讨论】:
-
能不能把你正在使用的显示功能的代码也显示一下?
-
我认为他正在使用 Smarty