<?php $user_id = 42; $month = 2; $year = 2016; $numberOfDaysInMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year); $weekDays = array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'); for($i=0;$i<$numberOfDaysInMonth;$i++){ $NewDate= date('01') + $i . '/' . $month . '/' . $year; $y = date('w'); $monthlyHour[$i] = new StdClass(); $monthlyHour[$i]->user_id= $user_id; $monthlyHour[$i]->tp = 10; $monthlyHour[$i]->days= $weekDays[$y]; $monthlyHour[$i]->date= $NewDate; $monthlyHour[$i]->working_hours = 5; } print_r($monthlyHour);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`