Convert timestamp into time()

54 views Asked by At

I want to convert a timestamp from mysql to format as time().

IF i have this date:

2015-06-05 08:53:30

I wants to convert to something like: 1433491545

I have to use the method date() ?

I cant found a solution.

1

There are 1 answers

0
Sougata Bose On BEST ANSWER

use strtotime() -

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

strtotime()