大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
while ($i$numberOfRows)
塔城ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!
{
$thisnamer = MYSQL_RESULT($result,$i,"namer");
$thisURL = MYSQL_RESULT($result,$i,"URL");
?
把这里面加个
if(($i%4)==0){
echo 'br';
}
由于不太清楚你说的横排是什么样的效果,以下是表格输出数据的示例代码:
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参数用于查询
$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 } ?