title: What is the best place in data generation to handle html creation (server side or clientside)
body: <p>I am writing a dashboard application that gets data from a php function which communicates with a db on the same server. This data is then called by an api call on a webpage. The JS code then loops through the requested data (differs based on given params) and creates the html code to display a table below a graph. The way this JS code creates the html code is simply by adding strings together and then pushing it to the relevant innerhtml.</p>
  <p>My question is since only a string is needed for this table code would it be more efficient to let the php (server side) code handle the html generation, or let the JS code handle the html code generation. The itteration steps wont change just where the html string is being generated?</p>