query("DESCRIBE patients"); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach ($rows as $row) { echo $row['Field'] . "\n"; }