In this tutorial you will learn how to find PHP date of next day in a PHP web application .
PHP date next day
In this tutorial you will learn how to find PHP date of next day in a PHP web application .The mktime() function that use for specific date convert to timestamp . The syntax of mktime() as :
mktime(hour,minute,second,month,day,year,is_dst);
When day parameter in mktime() function add by one get after one day timestamp that also date of next day .The code of "php-date-next-day.php" given below :
<?php $date=date('Y-m-d'); echo "Current date :: ".$date."<br>"; $date_arr=explode('-',$date); echo "Date next day =>"; $next_day=Date("Y-m-d",mktime(0,0,0,$date_arr[1],$date_arr[2]+1,$date_arr[0])); echo $next_day; ?>
Output :
When run "php-date-next-day.php" display output as :
[ 0 ] Comments