How to add time to php timestamp: First create a PHP sample file; then increase the current timestamp by one year through the "strtotime(" 1 year");" method; and finally output the increased result That’s it.
Recommended: "PHP Video Tutorial"
php current timestamp increase time
php adds one year to the current timestamp
echo strtotime(" 1 year");//Return the timestamp, if you want to convert it to a general time format You also need the following function
echo date('Y-m-d H:i:s', strtotime("+1 year"));
Similarly, it can not only be year, but also day, month and day. The following code:
The above is the detailed content of How to add time to php timestamp. For more information, please follow other related articles on the PHP Chinese website!