An error har occured.
', $e->getMessage(), ''; } $sth = $dbh->query("SELECT * FROM Category"); $sth->setFetchMode(PDO::FETCH_ASSOC); $result = $sth->fetchAll(); if (count($result) > 0) { $json = json_encode($result, JSON_UNESCAPED_UNICODE); echo "{\"items\":" . $json . "}"; }