Gebruik mysqli_fetch_assoc()
Hier ga je
$jsonData = array();
if(mysqli_num_rows($result) > 0){
while ($array = mysqli_fetch_assoc($result)) {
$jsonData[] = $array;
}
$json = json_encode($jsonData);
echo stripslashes($json);
}
Gebruik mysqli_fetch_assoc()
Hier ga je
$jsonData = array();
if(mysqli_num_rows($result) > 0){
while ($array = mysqli_fetch_assoc($result)) {
$jsonData[] = $array;
}
$json = json_encode($jsonData);
echo stripslashes($json);
}