function check_if_table_exists($table) {
// checks to see if a table in the database exists
$result = mysql_query(‘select * from ‘ . $table);
if (!$result) {
return false;
}
return true;
}

fonte: www.sastgroup.com