0
我有一個div的40個圖像(nopreview.png),我想要做的是用數據庫中的圖像替換nopreview.png,所以如果我在數據庫中有10個圖像,所以40個nopreview.png中的40個將被DB中的圖像替換,保持30個nopreview.png原樣。用數據庫圖像替換靜態圖像PHP
HTML
<div class="holder">
<img src="nopreview.png"/>
<img src="nopreview.png"/>
</div>
PHP
$uid="XXXXX";
$check = "SELECT rqid FROM users WHERE fbid = $uid LIMIT 0,250";
$rs = mysqli_query($con,$check);
if(mysqli_num_rows($rs)>0):
while($row = mysqli_fetch_assoc($rs)):
$reqid= $row['rqid'];
$requests = explode(',',$reqid);
foreach(array_unique($requests) as $request_id) {
echo $request_id."<br>";
echo"<img src='https://graph.facebook.com/$request_id/picture?width=78&height=78' />";
echo "<hr>";
}
endwhile;
endif;
滯留在把圖像DIV?
謝謝亞歷山大 – Roger 2014-10-02 05:48:04