I am trying to build a php function that would return an array with the start date and end date of the last n number of weeks. this would include the current week. It would look something like this:
function lastnweeks(n)
{
//the code. I am not asking for the code itself but ideas on how to accomplish this
return $array;
}
$lastnweeks =lastnweeks(2);
print_r($lastnweeks);
this would print:
Array (
[0] => Array (
[0] => 2010/09/20
[1] => 2010/09/26
)[1] => Array (
[0] => 2010/09/13
[1] => 2010/09/19
))