The output I get
Name Age
ABC 12
PQR 40
XYZ 10
code for retrieving data from MySql database using PHP.
//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;
}
desired output..
RowNo Name Age
1 ABC 12
2 PQR 40
3 XYZ 10
I want to send count number with mysql data as one colomn
. Can anybody guide me to on that?