<?php
include "koneksi.php";
$response = array();
$response["data"] = array();
$query = mysqli_query($koneksi, "SELECT * FROM pernyataan p, dimensi d WHERE d.id_dimensi=p.id_dimensi
	ORDER BY p.id_dimensi, p.id_pernyataan");
while ($row = mysqli_fetch_array($query)) {
	$output = array();
	$output["id_pernyataan"] = $row["id_pernyataan"];
	$output["nama_pernyataan"] = $row["nama_pernyataan"];
	$output["nama_dimensi"] = $row["nama_dimensi"];
	$output["id_dimensi"] = $row["id_dimensi"];

	array_push($response["data"], $output);
}
echo json_encode($response);
