将时间戳转换为时间()

时间:2015-06-05 08:13:02

标签: php date timestamp

我想将时间戳从mysql转换为格式为time()。

如果我有这个日期:

2015-06-05 08:53:30

我想转换为:1433491545

我必须使用方法date()?

我无法找到解决方案。

1 个答案:

答案 0 :(得分:2)

使用strtotime() -

strtotime("2015-06-05 08:53:30");

strtotime()

相关问题