while ($thisrow=mysql_fetch_row($result)) { $i=0; while ($i < mysql_num_fields($result)) { echo $thisrow[1], "
"; $i++; } }