I have a fairly complicated html table containing lots of PHP, CSS etc., and it comprises about 200 lines of code. I need to reproduce the table in three different areas on my webpage. What is the best approach to replicating the table the 2nd and 3rd time so that I don’t have to copy and paste the 200 lines of code each time? Surely there must be a best-practice for doing this.
Share
You can just use include files, then put a reference to the include file on each page where you want the table.
And more info from w3schools can be found here:
http://www.w3schools.com/php/php_includes.asp