<?php
include "connection.php";
header("Content-Type: application/json");

$rs = Database::search("SELECT * FROM `category`");
$data = [];

while ($row = $rs->fetch_assoc()) {
    $data[] = $row;
}

echo json_encode(["status" => true, "data" => $data]);
?>
