How to get rid of extra line breaks on top of table created with PHP?

前端 未结 1 978
离开以前
离开以前 2021-01-28 08:25

I am just starting coding in PHP. I am experiencing a problem that I am not able to solve with any solution I found on the net.

I am trying to show a table with the thre

相关标签:
1条回答
  • 2021-01-28 09:30

    Just remove your <br> after the </td> in this part of code :

        echo '<tr>';
            echo '<td>' . $row_hour[0] . '</td>' ; //hour when the thread was created
            echo '<td>' . $row_title[0] . '</td>' ; //title of the thread
            echo '<td>' . $row_author[0] . '</td>' ; //author of the thread
        echo '</tr>';
    

    Because <br> is not available in <table> structure, and the browser show them before.

    0 讨论(0)
提交回复
热议问题