Skriv nedan givna funktioner till din klass. Hoppas detta kommer att hjälpa saker och ting.
public function getTableData(){
$sql = "SELECT * FROM folders";
if($stmt = $this->connect->prepare($sql)) {
$stmt->execute();
$stmt->close();
$arrFinalArray = array();
while ($arrFolder = $stmt->fetch()){
$arrFinalArray[] = array(
'Name' => $arrFolder['folder_name'],
'Class' => $arrFolder['folder_class'],
'Link' => $arrFolder['folder_link']
);
}
}
}