How to display date in PHP? -
if date 2015-08-15. how display result this:
2015-08-15 2015-08-16 2015-08-17
i have following code:
$today = date('y-m-d'); $a = "3"; $nextdate = date('y-m-d', strtotime($today . ' + ' . $a . ' days')); echo $nextdate;
$date = new datetime(); echo $date->format('y-m-d') . '<br/>'; ($i = 1; $i < 3; $i++) { $date->modify('+1 day'); echo $date->format('y-m-d') . '<br/>'; }
Comments
Post a Comment