Hier sind die Spalten wie Studenten-ID, Student Name und Frage 1 usw. Ich möchte die width of column "question"
erhöhen. Wie kann ich das machen?Willst du die Breite der spezifischen Spalte in der Tabelle erhöhen. Php
Ich versuchte Breite durch Hinzufügen von Objekt in Tabellenkopf tag like width="100"
, funktioniert es als einfacher HTML-Code, aber funktioniert hier nicht in meinem erforderlichen Code. `
<?php
if (isset($result_display)) {
echo "<p><u>Result</u></p>";
if ($result_display == 'No record found !') {
echo $result_display;
} else {
echo "<table class='result_table'>";
echo '<tr><th>Student ID</th><th>Student Name</th><th>Question#1</th><th>Answer#1</th><th>Question#2</th><th>Answer#2</th><th>Question#3</th><th>Answer#3</th><th>Question#4</th><th>Answer#4</th><th>Question#5</th><th>Answer#5</th><th>Question#6</th><th>Answer#6</th><th>Question#7</th><th>Answer#7</th><th>Question#8</th><th>Answer#8</th><th>Question#9</th><th>Answer#9</th><th>Question#10</th><th>Answer#10</th><th>Question#11</th><th>Answer#11</th><th>Question#12</th><th>Answer#12</th><th>Question#13</th><th>Answer#13</th><th>Question#14</th><th>Answer#14</th><th>Question#15</th><th>Answer#15</th><tr/>';
foreach ($result_display as $value) {
echo '<tr>' . '<td class="e_id">' . $value->id . '</td>' .'<td class="name">' . $value->Student_name . '</td>' . '<td>' . $value->question1 . '</td>' . '<td class="j_date">' . $value->Answer1 . '</td>' . '<td>' . $value->question2 . '</td>' . '<td class="mob">' . $value->Answer2 . '</td>' . '<td >' . $value->question3 . '</td>' . '<td>' . $value->Answer3 . '</td>' . '<td>' . $value->question4 . '</td>' . '<td>' . $value->Answer4 . '</td>' . '<td>' . $value->question5 . '</td>' . '<td>' . $value->Answer5 . '</td>' . '<td>' . $value->question6 . '</td>' . '<td>' . $value->Answer6 . '</td>' . '<td>' . $value->question7 . '</td>' . '<td>' . $value->Answer7 . '</td>' . '<td>' . $value->question8 . '</td>' . '<td>' . $value->Answer8 . '</td>' . '<td>' . $value->question9 . '</td>' . '<td>' . $value->Answer9 . '</td>' . '<td>' . $value->question10 . '</td>' . '<td>' . $value->Answer10 . '</td>' . '<td>' . $value->question11 . '</td>' . '<td>' . $value->Answer11 . '</td>' . '<td>' . $value->question12 . '</td>' . '<td>' . $value->Answer12 . '</td>' . '<td>' . $value->question13 . '</td>' . '<td>' . $value->Answer13 . '</td>' . '<td>' . $value->question14 . '</td>' . '<td>' . $value->Answer14 . '</td>' . '<td>' . $value->question15 . '</td>' . '<td>' . $value->Answer15 . '</td>' . '<tr/>';
}
echo '</table>';
}
}
?>
</div>
</div>
Willkommen bei SO! Bitte bearbeiten Sie Ihre Frage (wenn es wieder möglich ist), damit der gesamte Code richtig formatiert ist. Zeigen Sie auch den Code, den Sie ausprobiert haben. –