hi
i have a date in which i want to add the the days .and find the date.

$date = "2009-03-31";
echo date("Y-m-d", strtotime($date ."+n days" ));
//where n is the number of days to be added
$date = "2009-03-31";
$n=10;
echo date("Y-m-d", strtotime($date ."+n days" ));

output
1969-12-31

:) Look closely and find that 1 difference yourself!

ya i got it

$date = "2009-03-31";
$n=10;
echo date("Y-m-d", strtotime($date ."+n days" ));
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.