What is the use of mktime() function ?

The mktime() function is used to find the future particular date after specifying the time peroid.

Example :

// Return future date
$futureDate = mktime(0,0,0,date("m")+30,date("d"),date("Y"));
echo date("d/m/Y", $futureDate);

Output :


As from the above example , it the date is displayed which falls 30 months after from the current date . 

Leave a Reply

Your email address will not be published.Required fields are marked *