一个PHP echo问题 ?

一个PHP echo问题 


DIEA
浏览 689回答 2
2回答

慕娘9325324

要看你的要显示资料库的那一个值。mysql_* 是不要再用了。用mysqli比较安全。mysql_fetch_row() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//1 tobby tobby78$2<html><?phpinclude('db.php');$query=mysql_query("select * from tb");$row=mysql_fetch_row($query);echo $row[0];echo $row[1];echo $row[2];?></html>mysql_fetch_assoc() &nbsp; // &nbsp;&nbsp;1 tobby tobby78$2<html><?phpinclude('db.php');$query=mysql_query("select * from tb");$row=mysql_fetch_assoc($query);echo $row['id'];echo $row['username'];echo $row['password'];?></html>mysql_fetch_array() &nbsp; &nbsp; &nbsp;// &nbsp;&nbsp;1 tobby tobby78$2<html><?phpinclude('db.php');$query=mysql_query("select * from tb");$row=mysql_fetch_array($query);echo $row['id'];echo $row['username'];echo $row['password'];<span style="color: #993300;">/* here both associative array and numeric array will work. */</span>echo $row[0];echo $row[1];echo $row[2];?></html>
打开App,查看更多内容
随时随地看视频慕课网APP