How to convert date to timestamp in PHP

2 Answers

0 votes
$timestamp = strtotime('03-11-2019');

echo $timestamp;

 
/*
run:
      
1572735600 
     
*/

 



answered Mar 11, 2019 by avibootz
0 votes
$timestamp = strtotime('now');

echo $timestamp;

 
/*
run:
      
1552291286
     
*/

 



answered Mar 11, 2019 by avibootz

Related questions

6 answers 621 views
621 views asked Jun 29, 2022 by avibootz
3 answers 402 views
2 answers 327 views
1 answer 235 views
2 answers 332 views
1 answer 265 views
...