In this tutorial you will learn how to find PHP date from string in a PHP web application.
PHP date from string
In this tutorial you will learn how to find PHP date from string in a PHP web application. In this tutorial $date_string variable use for assign date as string format and strtotime() function use for convert English textual description into a Unix timestamp . The code of "php-date-from-string.php" given below as :
<?php
$date_string = "2 Oct 2010 12:00:00";
echo "Date :: ".$date_string."<br>";
echo " Date from string :: ".date('Y-m-d',strtotime($date_string));
?>
Output :
When run "php-date-from-string.php" display output as :

[ 0 ] Comments