如何改变代码使从mysql中遍历提取在表格中的网址成为超链接(lj就是链接)?
$sql=mysql_query("select*fromcompletewherem_evaluatelike'%奇%'andm_evaluatelike'%幻%'an...
$sql = mysql_query("select * from complete where m_evaluate like '%奇%'and m_evaluate like '%幻%' and type like '%其它%' ;");
$datarow = mysql_num_rows($sql); //长度
//循环遍历出数据表中的数据
for($i=0;$i<$datarow;$i++){
$sql_arr = mysql_fetch_assoc($sql);
@$name = $sql_arr['m_name'];
@$type = $sql_arr['type'];
@$country = $sql_arr['country'];
@$score = $sql_arr['score'];
@$lj = $sql_arr['lj'];
echo "<tr><td>$name</td><td>$type</td><td>$country</td><td>$score</td><td>".$lj."</td></tr>";
} 展开
$datarow = mysql_num_rows($sql); //长度
//循环遍历出数据表中的数据
for($i=0;$i<$datarow;$i++){
$sql_arr = mysql_fetch_assoc($sql);
@$name = $sql_arr['m_name'];
@$type = $sql_arr['type'];
@$country = $sql_arr['country'];
@$score = $sql_arr['score'];
@$lj = $sql_arr['lj'];
echo "<tr><td>$name</td><td>$type</td><td>$country</td><td>$score</td><td>".$lj."</td></tr>";
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询