-2

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.

ntzz
  • 183
  • 4
  • 22

1 Answers1

2

use strtotime() -

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

strtotime()

Sougata Bose
  • 31,517
  • 8
  • 49
  • 87