View Full Version : previous wek number

03-30-2007, 01:31 PM
hi guys

how can i get the last week number. for example this week is 13 how can i get last weeks (12).

i have tried the following but give me 13 still.

$today = date("W");
$today_2 = '1';
echo $prev_week_number = $today - $today2;

thanks in advance

03-30-2007, 01:36 PM
sorry guys fixed it, spelling erro on the variable.

03-30-2007, 03:11 PM
echo date('W',strtotime('last week'));

will work :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum