query("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table_name'")->fetchAll(PDO::FETCH_COLUMN); print_r($columns); ?>In this example, we first connect to our database using PDO. We then specify the name of the table we want to retrieve column names from. We use a SQL query to retrieve column names, which is contained in a variable called $columns. Finally, we use the print_r function to output the array of column names to the console. The package library for this example is PDO, which is a PHP extension that provides a uniform interface for accessing databases.