if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$all_results[] = $row;
}
for ($i = 0; $i < count($all_results); ++$i) {
$cat = $all_results[$i]["category"];
if ($cat == "Hatch Parts") {
echo '
Hatch Parts';
} else {
echo '
Hatch Parts';
}
if ($cat == "Hinges") {
echo '
Hinges';
} else {
echo '
Hinges';
}
if ($cat == "Extrusions") {
echo '
Extrusions';
} else {
echo '
Extrusions';
}
if ($cat == "Fasteners") {
echo '
Fasteners';
} else {
echo '
Fasteners';
}
if ($cat == "Miscellaneous") {
echo '
Miscellaneous';
} else {
echo '
Miscellaneous';
}
}
}
?>