<html><body><?php$db = mysql_connect("localhost", "root","root");mysql_select_db("cg",$db);$sql="select * from pet";
$result=mysql_query($sql,$db);
while($arrary = mysql_fetch_row($result))
{
echo $array[0]." | ".$array[1];
}?></body></html>
$result=mysql_query($sql,$db);
while($arrary = mysql_fetch_row($result))
{
echo $array[0]." | ".$array[1];
}?></body></html>
真是太粗心了//sigh
谢谢liubin要不然真的是不敢搞php了