Reputation: 9
First i entered e6 = 24-09-2011 as input type = "text" in previous page then:
$a6 = $_POST["e6"] ;
$time = strtotime( $a6 );
$myDate = date ("y-m-d", $time );
echo $myDate ;
$n = strtotime(date("Y-m-d", strtotime($myDate)) . " +$a7 month");
$q = date("Y-m-d", $n);
echo $q ;
out put: 11-09-24 2013-09-24
I want to print 2011 in place of only 11. What should I do ?? pls help.
Upvotes: 0
Views: 121