while ($one = mysql_fetch_array($two)) {
<td>Want Serial No Here</td>
<td><?=$something['something']?></td>
}
我想自动编号序列号..可以吗?
最佳答案
我的印象是您正在尝试为每一行生成连续的数字:
<?php
$count = 0;
while($row = mysql_fetch_assoc($res)){
$count++;
echo '<tr><td>' . $count . '</td><td>' . htmlspecialchars($row['name']) . '</td></tr>';
}
关于php - 在mysql while函数中指定序列号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4510910/