I have a string '2019-01-05', I need to convert this to a date I assume so I can add an subtract a day from it. I then need to get the month, day and year from it.
$Today = strtotime($StringDate);
$Yesterday = strtotime('-1 day', strtotime($Today));
$Tomorrow = strtotime('+1 day', strtotime($Today));
I need to echo date('m', $Tomorrow) for example but I'm getting all sorts of errors.
Where am I going wrong?