while ($i$numberOfRows)
塔城ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書未來市場(chǎng)廣闊!成為創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:028-86922220(備注:SSL證書合作)期待與您的合作!
{
$thisnamer = MYSQL_RESULT($result,$i,"namer");
$thisURL = MYSQL_RESULT($result,$i,"URL");
?
把這里面加個(gè)
if(($i%4)==0){
echo 'br';
}
由于不太清楚你說的橫排是什么樣的效果,以下是表格輸出數(shù)據(jù)的示例代碼:
echo 'table border="1"';
while ($data = $mysql-fetchrow($result))
{
if ($Var_nums % 2 == 0)
{
$bgcolor = "F9F9F9";
} else
{
$bgcolor = "FFFFFF";
}
$Var_ty = $data['ty'];
$sql2 = "select name,pic,addtime,school from web_writing_author where id=$Var_ty";
$result2 = $mysql-query($sql2);
$bd = $mysql-fetchrow($result2);
echo 'tr';
printf('td%s/td td%s/td td%s/td td%s/td td%s/td td%s/td td%s/td td%s/td',
$data['id'],$data['ty'],$data['title'],$data['hit'],$bd['name'],$bd['pic'],$bd['addtime'],$bd['school']);
echo '/tr';
}
echo '/table';
$order = isset($_GET['order']) ($_GET['order'] == 'asc') ? 'asc' : 'desc';
接收order參數(shù)用于查詢
$order_hit = $order == 'asc' ? 'desc' : 'asc';
echo 'a href="xxx.php?order='.$order_hit.'"... .../a';
大概就是這樣。
?php
$sql="select * from vs_court order by id desc limit 3";
$query=mysql_query($sql);
echo "tabletrth第一列/thth第二列/thth第三列/th/tr";
while($array=mysql_fetch_array($query)){
?
tr
td height="120"img src="?php echo $row["thunbnail"]?" //td
td height="20" align="center" class="ty-qtitle"?php echo $array["tag"];?/td
td height="20" align="center" class="ty-qtitle"第三列值td
/tr
/table ?php } ?