|
 |
|
ช่วยดูโค๊ดแบ่งการแสดงผลออกเป็น 2 คอลัม หน่อยครับ ผมทำการแสดงผลโดยให้แสดงผลเป็น 2 คอลัม |
|
 |
|
|
 |
 |
|
ดูแล้วครับ งง เลยมาโพสถามครับ
|
 |
 |
 |
 |
Date :
2009-10-02 11:54:11 |
By :
แสน |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<?
$sql = "select * from products ";
$result= mysql_query($sql) or die(mysql_error());
$i=1;
while($row=mysql_fetch_array($result)){
if($i==1){
$i=2;
?>
<div class="servicecolumnzone">
//คอลัม ซ้าย
<div class="servicecolumn1">
<div>
<h5 class="inner"> <? echo $row['ProductName'];?> </h5>
<img src="images/theme/sm-img.jpg" alt="" class="abouticon" />
<p> <? echo $row['ProductDetail'];?></p>
</div>
<div class="clear"></div>
<h4>Deltail</h4>
</div>
<?
}else{
$i=1
?>
//คอลัม ขวา
<div class="servicecolumn2">
<div>
<h5 class="inner"> <? echo $row['ProductName'];?></h5>
<img src="images/theme/sm-img.jpg" alt="" class="abouticon" />
<p><? echo $row['ProductDetail'];?> </p></div>
<div class="clear">
</div>
<h4>Deltail</h4>
</div>
<div class="clear"></div>
<?}?>
</div>
<? } ?>
น่าจะได้ละ
|
 |
 |
 |
 |
Date :
2009-10-02 13:42:31 |
By :
Sek-Artdrinker |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
oops! ผมเข้าใจคำถามผิดหรอเนี่ย นึกว่าให้ตกแต่ง :p
|
 |
 |
 |
 |
Date :
2009-10-02 13:52:29 |
By :
xbeginner01 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|