简体   繁体   English

2种不同的输出(Chrome和IE / FIREFOX)

[英]2 Different outputs (Chrome and IE/FIREFOX)

When i load the database value like this: 当我像这样加载数据库值时:

<?=$list[time]?>  

In chrome the output is: 2013-10-07T14:27:56 In firefox the output is: 0000-00-00 00:00:00 在chrome中的输出是:2013-10-07T14:27:56在Firefox中的输出是:0000-00-00 00:00:00

How is this possible?? 这怎么可能?? $list[time] is a timestamp value in the database. $list[time]是数据库中的时间戳记值。

MY CODE: 我的密码:

$lsel_list = mysql_query("select * from users WHERE id = '$id' order by id asc");
while ($list = mysql_fetch_array($lsel_list)) { 
  echo"$list[time]";
} 

field time is timestamp in database with a time. 字段时间是数据库中带有时间的时间戳。 (2013-10-07 14:28:35) (2013-10-07 14:28:35)

Try this :
echo date("Y m d",strtotime($list[time]));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM