Converting json data to an HTML table

前端 未结 4 933
心在旅途
心在旅途 2021-01-03 09:43

I have an array of data in php and I need to display this data in a HTML table. Here is what an example data set looks like.

Array(
  Array
  (
     [compar         


        
4条回答
  •  孤独总比滥情好
    2021-01-03 10:10

    Welcome to Stack Overflow.

    I think either way is OK... I have found it easier to include plenty of markup in the response from the server side, when you're displaying a whole table (or row) at a time. If you're dynamically poking bits of data into a table that's already on the page, you might want to render it on the client side.

提交回复
热议问题