我在显示默认图像时遇到问题。我不知道该把它放在哪里。当没有图像显示时显示默认图像
$result = $conn->query("SELECT * FROM adoption;");
if($result->num_rows !=NULL){
while($rows = $result->fetch_assoc()) {
$AAnimalName = $rows['AAnimalName'];
$Abreed = $rows['Abreed'];
$Asex = $rows['Asex'];
$Acolor = $rows['Acolor'];
$image = $rows ['image'];
?>
<div class="container-custom1">
<?php echo '<img src = "admin/function/upload/'.$image.'" width = "248" height="190" class="age1" title>'?>
<?php echo "<i><h1 class='junction'><a style='cursor:pointer' class='junction'>".$AAnimalName."</a></h1></i>"."<br>".$Asex." /".$Abreed."<br>".$Acolor."<br>"?></div>
<?php
}
}
里面while循环里面吗? – Powerballs
yes''while''loop –
''div class =“container-custom1”><?php' this code –