Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.116.89.70
<?php
include ("database.php");
$query = 'select distinct fstate from dbname';
$result = mysqli_query($conn,$query);
while ($row = $result->fetch_assoc()) {
$array[] = $row;
}
$arr["state"] = $array;
$query = "select fstate, funivcode, funivname from dbname";
$result = mysqli_query($conn,$query);
while ($row = $result->fetch_assoc()) {
$array1[] = $row;
}
$arr["university"] = $array1;
echo json_encode($arr);
?>
|