nurdan karaman nurdan karaman - 7 days ago 6
PHP Question

Returning php div

I want to call the class "aa" twice and call it.
How to organize the following code for this.

<?php
$A2Gtr = mysql_query("SELECT * FROM pl_sayfalar WHERE kategori=3");
while($A2Oku = mysql_fetch_object($A2Gtr)){
?>
<div class="aa">
<div style="height:160px; float: left;" class="genel">
<div style="padding:15px;background-color:#F2ECD6; height:125px; float: left;"" class="resim">
<a style="float: left;" href="index.php?Git=UrunDetay&id=<?php echo $A2Oku->id?>">
<?php echo'<img src="Panel/Sayfalar/Bresimler/'.$A2Oku->bresim.'" width="220" height="130" alt="" />' ?>
</a>
<span style="margin-left:35px; position:absolute; width:385px; font-size:14px; color:#B43325; font-family:Verdana, Geneva, sans-serif; float: left" class="detay"><b><?php echo stripslashes(mb_substr($A2Oku->baslik,0,83,'UTF8')) ?></b>
<br></br>
<span style="font-size:12px; color:#666; font-family:Verdana, Geneva, sans-serif;">
<?php echo stripslashes(mb_substr($A2Oku->baslik2,0,280,'UTF8')) ?><a style="color:#CE0000;" href="index.php?Git=TurDetay&id=<?php echo $A2Oku->id?>"><i>...Devamı</i></a></span>
</span>

</div>
</div>
</div>

<?php }?>

Answer

It is?

// Your WHILE() +
$i = 0;
while($i < 2){
   $i++;
    // Your HTML code
}
Comments