Displaying view as row-based table, not as grid
You can probably achieve this with CSS, rather than modifying the PHP - or are you saying you want to output as an actual HTML table?  Views should do that for you.