setPage("entrys_frontend"); // Get entrys $call = new APICall("entrys/get.php"); $response = $call->response; if ($response["data"]["empty"]) { $html_block = "

There aren'n any entrys yet. Be the first one!

"; }else{ $entrys = json_decode($response["data"]["entrys"], true); $html_block = ""; foreach($entrys as $entry) { $name = $entry["name"]; $text = $entry["text"]; $date = $entry["date"]; $html_block .= '

' . $name . '

' . $date . '

' . $text . '

'; } } $htmlLoader->show(["%entrys%" => $html_block]);