在使用 TCPDF 制作 PDF 时,我<tr>
每 5次获取一个新的有一点问题:<td>
$bricks = "";
$bricks .= '<table>';
$bricks .= '<tr>';
foreach($bricks_selected as $key => $value) {
$num_check = substr($value, 4);
if($num_check != "0") {
$bricks .= '<td width="90" height="80"><img src="/var/www/brickmixer/bricks/tavler/RT'.substr($value, 0, 3).'.jpg" width="80" height="55"><br><b>RT '. substr($value, 0, 3) .' - '. $num_check .'%</b></td>';
}
}
我尝试过除法等,但它给了我一些有趣的结果。
该$bricks_selected
变量设置在脚本的顶部:
foreach($_POST as $key => $value) {
if($key == "bricks-selected") {
$bricks_selected = explode("&", $value);
}
}