Output sql query into html table

前端 未结 5 571
旧时难觅i
旧时难觅i 2021-01-16 04:52

I\'m trying to place the output of this PHP SQL query into a database table, but it is outputting all of the row data into one column.

if(isset($_POST[\'subm         


        
5条回答
  •  庸人自扰
    2021-01-16 05:02

    You need to explain the issue you're having. But from what I can see off the bat, you're looping through all the values of the row and outputting them as rows itself, instead of as a cell within the table row. The curly brackets around value are unnecessary as well, since you are concatenating the strings, you can just do ''.$value.'' OR "$value". PHP will parse variables within a string if the string is double quoted. I would also refrain from adding
    tags as direct children of a table. If you need spacing between table rows, use padding and margins.

提交回复
热议问题