$result = mysql_query("select * from music",$conn);
echo "<tr>";
while($field = mysql_fetch_field($result))
{
echo "<td> ".$field->name." </td>";
}
?>
</tr>
<?php
while ($rows = mysql_fetch_row($result))
{
echo "<tr>";
for($i = 0;$i <= count($rows);$i++)
echo "<td> ".$rows[$i]." </td>";
echo "</tr>";
}
?>
程序运行后输出的文字全部是?显示怎么回事?
为什么使用了$rows[$i]后出现未定义偏移量5?
运行结果为:
id musicname singer musictype musicpath
1 ?????????? ?????? mp3 d:php
Notice: Undefined offset: 5 in D:\PHP\form\show_table.php on line 27
请哪位老师给予指点。
谢谢!