Did you mean to write CREATE TABLE catsub1...
, without the $
?
Is the table name catsub1
, or are you trying to insert the value of the $catsub1
variable as the table name? In this case, you need to set the value of $catsub1
properly because apparently it is now 0
.
$catsub1 = "your_table_name";
$sql = "CREATE TABLE $catsub1 ...";