getMessage(); } $tbl = $_SESSION['tbl']; $tableNames = []; foreach (glob($tbl . "*.tbl") as $filename) { $tableInfo = pathinfo($filename); $tableNames[] = $tableInfo['filename']; } $tableNames = ['patchstring']; // Create an associative array to store rows for each table $tableRows = []; // Iterate over the table names foreach ($tableNames as $tableName) { $crud = new CRUD($tableName); $tableRows[$tableName] = $crud->readAll(); } ?>