-2
    $tmp['y'] = ($PDF->PageHeight*70.5)/100;
    $tmp['x']  = ($PDF->PageWidth*49.5)/100;
    $PDF->ShowTextAt($tmp['x'], $tmp['y'], date('m/d/Y'));

How would i add 7days to this current date code?

3 Answers3

5

strtotime is what I'd use.

echo date('m/d/Y', strtotime('+7 day'));
SenorAmor
  • 3,351
  • 16
  • 27
0

How about using DateTime

<?php
$date = new DateTime('2000-01-01');
$date->add(new DateInterval('P7D'));
echo $date->format('Y-m-d') . "\n";
?>
Igor S.
  • 3,332
  • 1
  • 25
  • 33
0

Simple example:

$dt = new DateTime('+7 days');
echo $dt->format('Y-m-d');
Glavić
  • 42,781
  • 13
  • 77
  • 107