【发布时间】:2014-09-11 09:16:18
【问题描述】:
我有一个关于在 PHP 变量中集成 PHP 代码的问题。 我正在做 PHP 到 PDF 的报告,我正在使用 PHP 到 PDF
我想从 ORACLE DB 查询表并将其打印为 PDF,现在我遇到了转义字符和其他内容的问题
我的代码是这样的,
$compProfileSql = "SELECT * FROM DRAWING WHERE PROJECT_NAME = :PROJNAME"
$compProfileParse = oci_parse($conn, $compProfileSql);
oci_bind_by_name($compProfileParse, ":PROJNAME", $_SESSION['cd-dropdown']);
oci_execute($compProfileParse);
$content = "
<table class=\"table table-bordered\">
<thead>
<tr>
<th>PROJECT NAME</th>
<th>COMPONENT</th>
<th>DRAWING</th>
</tr>
</thead>
<tbody>
while (($row = oci_fetch_array($compProfileParse, OCI_BOTH)) != false){
<tr>
<td>$row[COMP_TYPE]</td>
<td>$row[JML_DWG]</td>
<td>$row[JML_MARKING]</td>
</tr>
}
</tbody>
</table>
";
我无法在生成的 PDF 中看到表格。我在转义字符上犯了错误吗? 感谢您的帮助
【问题讨论】: