I got this:
$newcw = array_rand( range( 1, 52 ), 15 ) ;
shuffle($newcw);
$year = date("Y");
$time = mktime(0,0,0,1,1,$year) + ($newcw * 7 * 24 * 60 * 60);
$time = $time - ((date('N', $time) - 1) * 24 * 60 * 60);
$startWeek = date('D d-M-Y', $time);
$endWeek = date('D d-M-Y', $time + (6 * 24 * 60 * 60));
So basically I get a random integer which stands for calender week.
I calculate the starting day (monday) and ending day(sunday) of that calender week.
But I get following error:
Fatal error: Unsupported operand types in 88
line 88 would be this line:
$time = mktime(0,0,0,1,1,$year) + ($newcw * 7 * 24 * 60 * 60);
EDIT: I want a random integer which shall not repeats itself, that it why I am trying this method.