I have problem
How do I calculate the following with mktime()
$current_date = date('Y-m-d');
I want to take the $current_date variable and calculate 7 days behind so I can use it in a query.
$date = mktime (0,0,0,date("m"),date("d")-7,date("Y")); $date_behind=date("Y-m-d",$date);
you don't need the mktime function for this
<? $seven_days_ago = date ('Y-m-d', time () - 604800); ?>