���� ������������������������������������ query($query); $images = []; if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $images[] = $row; } } header('Content-Type: application/json'); echo json_encode($images); ?>