Event-API und randomimage hinzugefügt
This commit is contained in:
28
get_events.php
Executable file
28
get_events.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
include("../mysqlverbinden.php");
|
||||
include("rowforeach.php");
|
||||
|
||||
|
||||
$result=[];
|
||||
|
||||
foreach(srowforeach("SELECT * from `ritzenbergen-events`",[]) as $key => $value){
|
||||
$id=$value[0];
|
||||
$eventname=$value[1];
|
||||
$datum=$value[2];
|
||||
$type=$value[3];
|
||||
$content=$value[4];
|
||||
$link=$value[5];
|
||||
$foto=$value[6];
|
||||
array_push($result,[
|
||||
"id" => $id,
|
||||
"eventname" => $eventname,
|
||||
"datum" => $datum,
|
||||
"type" => $type,
|
||||
"content" => $content,
|
||||
"link" => $link,
|
||||
"foto" => $foto
|
||||
]);
|
||||
}
|
||||
|
||||
echo json_encode($result,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
Reference in New Issue
Block a user