I am trying to create a table using PDO my connection is fine as i just tested it with try catch block. But i am unable to create any table in my DB
function loadData($table)
{
$conn = new PDO("mysql:host=localhost;dbname=anlyatics_db", "root", "");
$query = "CREATE TABLE if not exists $table); ";
$stmt = $conn->prepare($query);
if ($stmt)
{
$stmt->execute();
}
}
$stmt->ErrorInfo()?$tablecontain?