0
我很困惑。 PEAR包HTML_Table看起來很簡單,只填充表格標題行的內容。所有添加了addRow的行都是空的。這裏的代碼 - 任何幫助表示讚賞!HTML_Table包只填充標題行
require_once("HTML/Table.php");
$q = new HTML_Table();
$q->setAutoGrow(TRUE);
$th = array("hdr1","hdr2","hdr3");
$tr1 = array("cell1","cell2","cell3");
$q->addRow($th, null, "th");
$q->addRow($tr1, null, "tr");
echo ($q->toHtml());
結果:
<table>
<tr>
<th>hdr1</th>
<th>hdr2</th>
<th>hdr3</th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
你可以顯示你用來顯示這個輸出的php嗎? –