below are the php coding that i used to display a data in the table form..
what i want to do is the number which is .$row['number']. will be automatically increment when there is a new data in the table..
how to do it by using loop...
<?php
$query="SELECT * FROM asset";
$result = mysql_query($query);
if (!$result)
echo "<h3>Cannot Process Query</h3>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
<?php
$i=0; // Or start from 1 if you prefer.
$query="SELECT * FROM asset";
$result = mysql_query($query);
if (!$result) {echo "<h3>Cannot Process Query</h3>";}
while ($row = mysql_fetch_assoc($result)
{
echo "<tr>";
echo "<td class=style6>".$i++."</td>"; //Is this what you wanted ??
foreach ($row as $key => $value)
{