[SOLVED] strtotime next thursday returning a wednesday
Posted: Fri Dec 05, 2008 5:09 am
if you were to run this code
i get the result 2009-10-28
i make that a wednesday.
I have this code working in a loop that returns me a year full of thursdays. it works fine until it gets to this date.
Heres the result of that loop array

Code: Select all
$text_day = 'Th';
$year = '2009';
$month = '10';
$day = '23';
if ( $text_day == 'Th' ){
$next_thursday = date('Y-m-d', strtotime("next Thursday", mktime(0,0,0,$month,$day,$year)));
echo $next_thursday.' <BR>';
return $next_thursday;
}
i make that a wednesday.
I have this code working in a loop that returns me a year full of thursdays. it works fine until it gets to this date.
Heres the result of that loop array
any ideas??Array ( [0] => 2008-12-11 [1] => 2008-12-18 [2] => 2008-12-25 [3] => 2009-01-01 [4] => 2009-01-08 [5] => 2009-01-15 [6] => 2009-01-22 [7] => 2009-01-29 [8] => 2009-02-05 [9] => 2009-02-12 [10] => 2009-02-19 [11] => 2009-02-26 [12] => 2009-03-05 [13] => 2009-03-12 [14] => 2009-03-19 [15] => 2009-03-26 [16] => 2009-04-02 [17] => 2009-04-09 [18] => 2009-04-16 [19] => 2009-04-23 [20] => 2009-04-30 [21] => 2009-05-07 [22] => 2009-05-14 [23] => 2009-05-21 [24] => 2009-05-28 [25] => 2009-06-04 [26] => 2009-06-11 [27] => 2009-06-18 [28] => 2009-06-25 [29] => 2009-07-02 [30] => 2009-07-09 [31] => 2009-07-16 [32] => 2009-07-23 [33] => 2009-07-30 [34] => 2009-08-06 [35] => 2009-08-13 [36] => 2009-08-20 [37] => 2009-08-27 [38] => 2009-09-03 [39] => 2009-09-10 [40] => 2009-09-17 [41] => 2009-09-24 [42] => 2009-10-01 [43] => 2009-10-08 [44] => 2009-10-15 [45] => 2009-10-22 [46] => 2009-10-28 [47] => 2009-11-05 [48] => 2009-11-12 [49] => 2009-11-19 [50] => 2009-11-26 )