Just to clear up a possible misconception about the script in the question...

`$result = $db->loadResult();` does not have an active/necessary role to play in the process.  `$result` is not be used after it is declared and it does not "set up" `loadRow()`.

As for how to echo out each column value, I'll recommend `implode()` as the most concise method.  In doing so, it won't matter if you build your result set from `loadRow()` or `loadAssoc()` because `implode()` will ignore the keys.  What DOES matter is the columns that you write into your SELECT clause -- this will dictate exactly which columns are presented.  It is unlikely that you will want to display ALL of the columns so `*` should be swapped out for literal column declarations (either as a comma separated string or an array of strings).  The snippet to follow will work flawlessly even if you only select a single column (and generate a multidimensional result set).

To correct/extend what Lodder has posted with `implode()`:

    if (!$rows = $db->loadRow()) {  // declare and check
        echo "No Rows Found";
    } else {
        echo '<table>';
            foreach($rows as $row) {
                echo '<tr>';
                    echo '<td>' , implode('</td><td>', $row) , '</td>';
                echo '</tr>';
            }
        echo '</table>';
    }

If you would like to display a row of column headings, then use `loadAssoc()` to generate the result set. If you wish to adjust one or more column headings to be printed to screen, use a "column alias" where appropriate in the SELECT clause of your query.

    if (!$rows = $db->loadAssoc()) {  // declare and check
        echo "No Rows Found";
    } else {
        echo '<table>';
            echo '<tr>';
                echo '<th>' , implode('</th><th>', array_keys($rows[0]) , '</th>';
            echo '</tr>';
            foreach($rows as $row) {
                echo '<tr>';
                    echo '<td>' , implode('</td><td>', $row) , '</td>';
                echo '</tr>';
            }
        echo '</table>';
    }