如何將行返回到表格形式並避免字段爲空?返回一行並避免其中的空字段
<?php
$o = mysqli_query("SELECT * FROM orders ORDER BY po_number DESC LIMIT 1");
echo 'The Following Order Information has been submited.';
echo '<table width="70%" border="5" align="center">';
while($row = mysqli_fetch_array($o)) {
echo '<tr>';
foreach($row as $field) {
echo '<td>' . htmlspecialchars($field) . '</td>';
}
echo '</tr>';
}
echo '</table>';
?>
使用'array_filter($行)''之前的foreach()' – MH2K9 2014-11-07 02:53:25
加上'if'條件。 – sectus 2014-11-07 02:53:53