PHP 中的边框 table 和布局打印
Border table in PHP and layout print
查询的结果页面有两个问题....
问题编号 1
table.
的边框
我有一串相同的字符串
$ content. = "<tr> <td> Total <td>". $ line ["total"]. "";
我只想要变量 php (". $ riga [" total"]."
) 的边框。
我试过
PHP: $ content. = "<tr> <td> Total <td> <table border =" 1 ">". $ line ["total_arrest"]. "";
,但显然出错了。
我该如何解决?
第 2 期
使用此代码在word中导出结果搜索
if (isset ($ _ POST ['submit'])) {
header ("Content-Type: application / vnd.msword");
header ("Expires: 0"); // no-cache
header ("Cache-Control: must-revalidate, post-check = 0, pre-check = 0"); // no-cache
header ("content-disposition: attachment; filename = morning _" date ("d_m_Y"). "doc");
}
我正确地导出了它,但我想用打印布局导出它,因为它是在网页布局中进行的
对于第 1 期,您可以尝试在 table 标签中使用内联 CSS 样式,即
风格="border: 1px solid black;"
查询的结果页面有两个问题.... 问题编号 1 table.
的边框我有一串相同的字符串
$ content. = "<tr> <td> Total <td>". $ line ["total"]. "";
我只想要变量 php (". $ riga [" total"]."
) 的边框。
我试过
PHP: $ content. = "<tr> <td> Total <td> <table border =" 1 ">". $ line ["total_arrest"]. "";
,但显然出错了。
我该如何解决?
第 2 期
使用此代码在word中导出结果搜索
if (isset ($ _ POST ['submit'])) {
header ("Content-Type: application / vnd.msword");
header ("Expires: 0"); // no-cache
header ("Cache-Control: must-revalidate, post-check = 0, pre-check = 0"); // no-cache
header ("content-disposition: attachment; filename = morning _" date ("d_m_Y"). "doc");
}
我正确地导出了它,但我想用打印布局导出它,因为它是在网页布局中进行的
对于第 1 期,您可以尝试在 table 标签中使用内联 CSS 样式,即
风格="border: 1px solid black;"