Menu
Just a slight problem in my coding. I’m trying to create a mysql table in a for loop but when i echo the sql statement it only pulls the last item in the array out.
for ($c=0; $c < $num; $c++) {
// echo $data[$c] . “<br />n”;
$sql = “CREATE TABLE ACR (
acrID int NOT NULL,
“.$data[$c].” varchar(100) NULL,
PRIMARY KEY (acrID))type=MyISAM”;
}
echo $sql;
}
How can i get it to pull all 187 $data variables inside the for loop instead of just the last $data variable?