<?php
require_once "../../db.php";

$result = $conn->query("
  SELECT id, name 
  FROM merch_categories 
  ORDER BY name ASC
");

$categories = [];

while ($row = $result->fetch_assoc()) {
  $categories[] = $row;
}

echo json_encode($categories);
