I have a code which inserts data's in each tables in a specific database. After i run it this error come up
"Parse error: syntax error, unexpected '}', expecting ';' in C:\xampp\htdocs\Thesis\database\insertdata.php on line 37"
I check the codes for typo error but still i don't see any error on it maybe it is cause by a looping error
This is my Code
$db_name = array('morning_section_masterfile','evening_section_masterfile','afternoon_section_masterfile');
for($y=0;$y<=2;$y++)
{
$db = mysql_select_db($db_name[$y],$connectDatabase);
$tables = array('Pilot_Sections','Black_Sections');
for($a=0;$a<=1;$a++)
{
//variable making
$teacher = array ('Jane','Jeff','Liezeth','Loremas','Canada');
$Default_Lname = 'Lorems';
$Default_Fname = 'Vierzehn';
$x=0;
//Adding 30 students in one section
do
{
for($i=0;$i<=30;$i++)
{
$section_teacher = $teacher[$x];
$student_section = 'IT70'.$x.'E-C';
$student_Lname = str_shuffle($Default_Lname);
$student_Fname = str_shuffle($Default_Fname);
$table = $tables[$a];
$insert = "INSERT INTO $table (section_Teacher, student_Lastname, student_Firstname, student_Section) VALUES
('{$section_teacher}','{$student_Lname}','{$student_Fname}','{$student_section}')";
$insertdata = mysql_query($insert,$connectDatabase);
}
//check the number of students in a section section and adding another section
if($i==31)
{
$x++;
$i=0;
}
} while($x<=4)
}
}