abdouaniba
New Member
Ok, I have been looking at this code and I cannot figure why its adding duplicate th's. The table data is not adding any extra td, so I am kinda stumped. Could this be due to missing an element somewhere? I am not thinking that my PHP code is affecting it in anyway.\[code\]<!doctype html><html><head><title></title><meta charset="utf-8"><meta name="description" content=""><link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/12760989/css/reset.css"><link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/12760989/css/master.css"></head><body><?php//header("Content-type: application/vnd.ms-excel");//header("Content-Disposition: attachment; filename=excel.xls");include('queries.php');$role = $_POST["role"];$menu = $_POST["menu"];$tests = getTestCases($role, $menu);?><form action="testCaseToExcel.php" method="post"><input type="submit" value="http://stackoverflow.com/questions/12760989/Download to Excel" /></form><table border="1" style="width: 100%;"><thead><tr> <th>Role<th> <th>Path<th> <th>Link<th> <th>Link Type<th></tr></thead><?php foreach ($tests as $test) { ?> <tr> <td> <?php echo $test->role;?> </td> <td> <?php echo $test->path;?> </td> <td> <?php echo $test->link_name;?> </td> <td> <?php echo $test->link_type;?> </td> </tr> <?php }?></table><form action="testCaseToExcel.php" method="post"><input type="submit" value="http://stackoverflow.com/questions/12760989/Download to Excel" /></form></body></html>\[/code\]