Converting date to timestamp in PHP

I need to convert a date to a timestamp. How can I do this?

Comments

  • If your date is "12-06-2013",

    Use strtotime() function as follows.

    $timestamp = strtotime('12-06-2013');

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion