PHP 无法输出 遍历 foreach
$query="select*from$tb_name";$result=mysql_query($query);$rs=mysql_fetch_assoc($resul...
$query = "select * from $tb_name";
$result = mysql_query($query);
$rs = mysql_fetch_assoc($result);
while(!isset($rs)){
die("could not to the database</br>".mysql_error());
}
//print_r($rs);
foreach($rs as $k=>$v)
{
echo $key."=>".$value."</br>";
}
提示语法错误!!! 展开
$result = mysql_query($query);
$rs = mysql_fetch_assoc($result);
while(!isset($rs)){
die("could not to the database</br>".mysql_error());
}
//print_r($rs);
foreach($rs as $k=>$v)
{
echo $key."=>".$value."</br>";
}
提示语法错误!!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询