我正在调用从视图中选择所有内容的 SQL 语句。可能会返回一些空值,我想在 HTML 文档中找到它们并突出显示它们。到目前为止,这是我的代码。如何找到空列(可以在图片中看到)以便我可以使用 CSS 突出显示它们?
谢谢。
<?php
require_once '../includes/header.php';
$sql = $conn->prepare("SELECT * FROM vw_allpropertiesandagents ORDER BY Price");
$sql->execute();
?>
<section class="main-sec">
<h1>All Agents and All properties</h1>
<p>The properties even the ones that have no agents assigned to them are displayed</p>
<table class ='dba-table'>
<tr>
<th>Property Id</th>
<th>Full Address</th>
<th>Price</th>
<th>Property Agent Id</th>
<th>Agent Id</th>
<th>For</th>
<th>Property Type</th>
</tr>
<?php while ($row = $sql->fetch()){ ?>
<tr>
<?php
foreach ($row as $value){ ?>
<td><?php echo $value?></td>
<?php } ?>
</tr>
<?php } ?>
</table>
</section>
<?php
require_once '../includes/footer.php';
?>
MYYA