I do not get an output when the content loaded from the database is much, not even this
[]
It is just empty.
- But when I have just a few rows it works well.
And when there is no content I get as expected these brackets:
[ ]
Here is the code
<?PHP
//Verbindung zur Datenbank
include "inc_mysqli.php";
//SQL-String
$sql = "SELECT * FROM term WHERE id_module ='".mysqli_real_escape_string($db, $_GET['id_module'])."'ORDER BY name ASC";
// Codierung
mysqli_set_charset("utf8");
//SQL-Befehl
$result = mysqli_query($db, $sql);
//Array erstellen
$jsonArray = array();
while($row = mysqli_fetch_assoc($result)) {
$jsonArray[] = $row;
}
//JSON Kodierung
echo json_encode($jsonArray, JSON_UNESCAPED_UNICODE);
?>
What do I need to add?