If I\'ve got a $date YYYY-mm-dd and want to get a specific $day (specified by 0 (sunday) to 6 (saturday)) of the week that YYYY-
$date
YYYY-mm-dd
$day
YYYY-
Try
$date = '2012-10-11'; $day = 1; $days = array('Sunday', 'Monday', 'Tuesday', 'Wednesday','Thursday','Friday', 'Saturday'); echo date('Y-m-d', strtotime($days[$day], strtotime($date)));