K
K
KronosHD2015-09-30 18:40:33
PHP
KronosHD, 2015-09-30 18:40:33

How to make a date a day ahead | PHP?

Here is the text for example:

Valid until: 09/30/15

It needs to show up a day ahead. That is, 10/01/15, not 09/31/15
How to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-09-30
@KronosHD

echo (new DateTime('+1 day'))->format('Y.m.d');
php.net/manual/ru/datetime.formats.relative.php

M
Maxim, 2015-09-30
@maxloyko

$date = strtotime("+1 day");
echo date('d.m.Y', $date);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question