我想知道为什么 while 循环不会覆盖$kid值?
$lastrow = //another mysql query to get the id of last row.
$kid = 0;
$result = mysql_query("SELECT kid.......
while(list($kid) = mysql_fetch_row($result)) {
...
}
echo $kid;
if ($lastrow != $kid) echo "<a href="/show-more.php">show more results</a>";
出于某种原因,在 while 循环 $kid 为 "" 之后 - 为空,并且循环不会覆盖此值。