In this tutorial you will learn how to find PHP date of next Monday in a PHP web application.
PHP date next Monday
In this tutorial you will learn how to find PHP date of next Monday in a PHP web application. The strtotime() function that convert textual date format to Unix timestamp . When pass textual format "next Monday" in strtotime() function returns next Monday Unix timestamp that again also convert in date format. The code of "php-date-next-monday.php" given below :
<?php $date=date('Y-m-d'); echo "Current date :: ".$date."<br>"; echo "Date next Monday : "; echo date('Y-m-d',strtotime("next Monday")); ?>
Output :
When run "php-date-next-monday.php" display output as :
[ 0 ] Comments