![]() |
|
|
+ Search |
![]()
|
Jul 24th, 2004 00:37
Philip Olson, Steve Wykpisz,
You first want to get the unix timestamp from the date as doing this
will make this a simple matter of addition. Using mktime() is another
option.
Since the format you speak of is pretty common, let's do this:
<?php
$date = '7/23/2004';
$timestamp_current = strtotime($date);
$timestamp_future = $timestamp_current + (60*60*24*90);
// The following will print 10/21/2004
echo date('n/j/Y', $timestamp_future);
?>
See also: http://www.php.net/function.strtotime
http://www.php.net/function.date
http://www.php.net/function.mktime