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