我有一张表,目前显示如下:
Question OptionType
What is 2+2
What is 3+3
What is 4+4
A-D
A-C
A-E
但我不希望它像这样明显地显示,问题应该放在“问题”标题下,选项类型应该放在“选项类型”标题下。如何让表格显示如下:
Question OptionType
What is 2+2 A-D
What is 3+3 A-C
What is 4+4 A-E
下面是代码:
echo "<table>
<tr>
<th class='questionth'>Question</th>
<th class='optiontypeth'>Option Type</th>
</tr>";
foreach ($searchResults as $question) {
echo '<tr><td>'.htmlspecialchars($question).'</td></tr>';
}
foreach ($searchOption as $option) {
echo '<tr><td>'.htmlspecialchars($option).'</td></tr>';
}
echo "</table>";