I wrote this piece of code
echo date("Y-m-d", strtotime($date, strtotime("+ " . $days . " days")));
$date = 2012-04-12
$days = 15
I am looking to add $days
(15 days) to the date (2012-04-12
) I am expecting to get 2012-04-27
and this code returns me 2012-04-12
, what am I doing wrong?
echo date('Y-m-d', strtotime('+15 days', strtotime('2012-04-12')));