gpt4 book ai didi

PHP For 循环不启动

转载 作者:行者123 更新时间:2023-11-29 04:23:35 25 4
gpt4 key购买 nike

<分区>

$queryGetTop = ("SELECT id,name,address,port,vote,isspon FROM servers ORDER BY vote ASC LIMIT 10");
$actionGetTop = mysql_query($queryGetTop);
while ($rowGetTop = mysql_fetch_array($actionGetTop)) {
$countGetTopname[] = $rowGetTop['name'];
$countGetTopip[] = $rowGetTop['address'];
$countGetTopvotes[] = $rowGetTop['vote'];
$countGetTopspon[] = $rowGetTop['isspon'];
$countGetTopport[] = $rowGetTop['port'];
$countGetTopid[] = $rowGetTop['id'];
}

$length = count($countGetTopname);



for ($i = 0; $i > $length; $i++) {
echo $i;

/* echo"

<tbody>
<tr>
<td><span "; if($countGetTopspon[$i] == "1"){echo "class=\"label label-important\">Sponsored</span>";}echo $countGetTopname[$i]."</td>
<td>". $countGetTopip[$i] .":". $countGetTopport[$i] ."</td>
<td>". $countGetTopvotes[$i] ."</td>
</tr>
</tbody>
"; */
}

我进行了一些调试,我的 MySQL 数组进入了数组。所以我在 for 循环中 echo'd $i 并且没有打印任何内容,所以 for 循环是问题所在。我不确定我做错了什么循环没有打印任何错误表只是没有打印(当它不在评论中时)。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com