Integrating jQuery fullcalendar into PHP website

前端 未结 11 1144
夕颜
夕颜 2021-02-01 09:28

I would like to integrate the jQuery fullcalendar into my PHP website, but I don\'t know how to handle the event and how to use the JSON data from MySQL.

Any advice wou

11条回答
  •  感动是毒
    2021-02-01 10:20

    implement it this way and it works fine

    $result = mysql_query("SELECT * FROM eventoform",$conexion);
            $array = array();
            $i = 0;
            while ($row = mysql_fetch_array($result)) {
                $array[$i]=array("id"=>$row["id_evento"],"title"=>$row["NombreEvento"],"start"=>$row["FechaInicio"]." ".$row["HoraInicio"],"allDay"=>false,"description"=>$row["description"],"editable"=>true);
                $i++;
            }
    
     echo json_encode($array);
    

提交回复
热议问题