Okay, risolto:
codice:$date_list = ""; $sql = "SELECT start, end FROM calendario ORDER BY id ASC"; $result = $link->query($sql); while($row = $result->fetch_assoc()) { $start = $row["start"]; $end = $row["end"]; $data_in = new DateTime($start); $data_out = new DateTime($end); $diff = $data_out->diff($data_in); $diff->days; $create_date = []; for ($i=1;$i<=$diff->days;$i++) { $data_in->add(new DateInterval('P1D')); $create_date[] = $data_in->format('Y-m-d'); $date_list .= implode(",", $create_date) . ","; } } $cutchar = 10; $date_list = substr($date_list, $cutchar); $date_list = implode(',', array_unique(explode(',', $date_list))); $date_list = str_replace("\"","",$date_list); $date_list = str_replace(",","','",$date_list); $date_list = str_replace("-","/",$date_list); $date_list = "disabledDates: ['" . $date_list . "'], formatDate:'Y/m/d',"; echo $date_list;

Rispondi quotando