我得到的输出
Name Age
ABC 12
PQR 40
XYZ 10
使用 PHP 从 MySql 数据库中检索数据的代码。
//Get records from database
$result = mysql_query("SELECT * FROM people;");
//Add all records to an array
$rows = array();
$count = 0;
while($row = mysql_fetch_array($result))
{
// Here i want to bind one more colomn for count as Row number to array
count = count + 1;
$rows[] = $row;
}
想要的输出..
RowNo Name Age
1 ABC 12
2 PQR 40
3 XYZ 10
我想用 发送计数mysql data as one colomn
。有人可以指导我吗?