<?php
include 'db.php';

$sql = "SELECT DISTINCT division FROM Location";
$result = $conn->query($sql);

$divisions = array();
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $divisions[] = $row['division'];
    }
}

echo json_encode($divisions);
$conn->close();
?>
