Profesör GGOfis hocam kendim sayfamdaki kodlama bu şekilde, html olan kodlamaya uyarlamaya çalıştım yapamadım

<?php
$sql = $db->query("SELECT * FROM resimler where sayfa_id=".$say->id." AND dil='".$dil."' ORDER BY sira ASC");
while($row    = $sql->fetch(PDO::FETCH_OBJ)){
if($row->resim != $say->resim){
?>
<a href="uploads/<?=$row->resim;?>"><img src="uploads/<?=$row->resim;?>"></a>
<? } ?>
<a href="javascript:void(0);"><img src="uploads/thumb/<?=$row->resim;?>"></a>
<? } ?>