我有如下所示的代码。我想要做的是对每个回显行进行编号,或者根据下面的代码获得总共过滤了多少行。
<?php
$host="localhost"; // Host name
$username="****"; // Mysql username
$password="****"; // Mysql password
$db_name="****"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$result = mysql_query("SELECT * FROM members WHERE dealer= 'Panzer Protection'");
?>
<?php
while($rows=mysql_fetch_array($result)){
?>
<tr>
<td bgcolor="#FF0000"><center>
<? echo $rows['member_msisdn']; ?></td>
<td bgcolor="#FF0000"><center>
<? echo $rows['member_name']; ?></td>
<td bgcolor="#FF0000"><? echo $rows['dealer']; ?></td>
<td align="center" bgcolor="#FFFFFF"> </td>
<td align="center" bgcolor="#FFFFFF"><a href="control_clientinfo.php?member_id=
<? echo $rows['member_id']; ?>" class="update">Look Up</a></td>
</tr>
<?php
}
?>
所以基本上我需要计算代码显示的行数