too long

Possible Duplicate:
Calculating days of week given a week number

In PHP you can get the number of week with 'date('W');' and it will return ISO-8601 week number of year

Now how I can get the days of an specific week and the month(s) ?

Update: For example I know 'Monday the 12th week of 2011' and want to get '31st March'

For days in a month you can use cal_days_in_month and for days in a specified week you can check out the following question: Calculating days of week given a week number

Check out the docs at http://php.net/manual/en/function.date.php

I think you want date('d') and date('F').

$start = strtotime('this Sunday');
$finish = strtotime('this Saturday');

$days = array();

while ($start <= $finish) {
   $days[] = date('d-m', $start);
   $start += strtotime('+1 day', 0);
}

var_dump($days);

CodePad.

Output

array(7) {
  [0]=>
  string(5) "24-04"
  [1]=>
  string(5) "25-04"
  [2]=>
  string(5) "26-04"
  [3]=>
  string(5) "27-04"
  [4]=>
  string(5) "28-04"
  [5]=>
  string(5) "29-04"
  [6]=>
  string(5) "30-04"
}

I got somthing for you:

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));

you can also do:

// out: July 1,2000 is on the 7th day
echo "July 1, 2000 is on the " . date("N", mktime(0, 0, 0, 7, 1, 2000)) ."th day";  

http://php.net/manual/en/function.date.php http://www.php.net/manual/en/function.mktime.php