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 615 views
615 views asked Jun 29, 2022 by avibootz
3 answers 398 views
2 answers 322 views
1 answer 232 views
2 answers 328 views
1 answer 264 views
...