I'm trying to make a script that will add x months to a certain date. I've been having trouble with what I have written though and I don't know why I'm having problems. Here's what I have:
<?
$month = 3;
$day = 30;
$year = 2003;
$x = 3;
$today = mktime("","",$month,$day,$year);
$x = floor($x);
echo date ( 'M-d-Y', mktime (0,0,0,$today['mon'],$today['mday'] - $x,$today['year']) );
?>
At one point I had $today = getdate(); and it worked fine, although I don't know how to make getdate() equal a customized date.
Any help would be appreciated.