-4

I have tring that contain date

i.e: 2018-07-18

Is there any function that get the string and add 1 day, so the result should be: 2018-07-19

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
Roi
  • 61
  • 1
  • 9

1 Answers1

0

This should work:

$date = "2018-07-18";
$new_date = date('Y-m-d', strtotime($date. ' + 1 days'));