In this tutorial you will learn how convert PHP date to timestamp in a PHP web application.
PHP date to timestamp
In this tutorial you will learn how convert PHP date to timestamp in a PHP web application. The code of "php-date-to-timestamp.php" given below :
<?php $date=date('Y-m-d'); echo "Date :: ".$date."<br>"; $date_arr=explode('-',$date); echo "Date to timestamp =>"; echo mktime(0,0,0,$date_arr[1],$date_arr[2],$date_arr[0]); ?>
Output :
When run "php-date-to-timestamp.php" display output as :
[ 0 ] Comments