i want repeat elments in array php, with consider select different element form array every time for started repeat. i have code like this:
$numbermonth=$_GET['month'];
$year=$_GET['year'];
$day_list = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun');
$days_in_month = date("t", mktime(0, 0, 0, $numbermonth, 1, $year));
$first_day_in_month = date('D', mktime(0,0,0, $numbermonth, 1, $year));
for($i=0; $i<=$days_in_month; $i++){
//i want echo here days names, first day name must be $first_day_in_month
// and repeat days yet array is not ended
echo $day_list[$i];
}