<?php include("dbconn.php"); //Load Database Connection $results = $mysqli->query("SELECT * FROM documentsubcat"); while ($resRow = $results->fetch_assoc()) { $id = $resRow["id"]; // $cattype = $resRow["cattype"]; //Category type $title = $resRow["title"]; //Sub Category title $dorder = $resRow["dorder"]; //sub category Order $skillid = $resRow["skillid"]; //Skill ID }