$result = mysql_query("select * from formtable") or die("Records could not be fetched");
while($row=mysql_fetch_row($result))
{
echo $row[0].$row[1].$row[2];
}
The above code runs perfect. But i find this statement -> echo $row[0].$row[1].$row[2] bit too static. Because if a new column is added i will have to modify the code as echo $row[0].$row[1].$row[2].$row[3].
So, How can i count total columns of the row in order to avoid such a problem?
Better to use something like:-