Files
portfoliowai/models/techstack.php
T
2026-06-05 08:47:11 +08:00

18 lines
401 B
PHP

<?php
require_once __DIR__ . "/../config/db.php";
function getTechStack($mysqli){
$sql = "SELECT tech_name FROM techstack";
$result = $mysqli->query($sql);
$techs = [];
if ($result) {
// Loop through the database rows and push names into the array
while ($row = $result->fetch_assoc()) {
$techs[] = $row['tech_name'];
}
}
return $techs;
}
?>