foreach ($columnHeaders as &$columnHeader){
global $db_host, $db_name, $db_user, $db_pass;
$db = new PDO("mysql:host=$db_host;dbname=$db_name;charset=utf8", "$db_user", "$db_pass");
if (count($db->query("SHOW COLUMNS FROM `Tickets` LIKE '".str_replace(" ", "_", $columnHeader)."'")->fetchAll())){
echo $columnHeader."<br>";
//outputs the columnHeader. So I just have to loop through array and compare?
}
$db = null;
}