Skip to content
Advertisement

How to display entire MySQL table without entering table name in PHP [closed]

My code is given below. In which I can only print the table headings. I want the table whose name I entered in the database should show the entire table.

JavaScript

Advertisement

Answer

On second foreach loop you are printing same variable which you have used for column name, so its printing the column name also for second loop, edited code below please check, to print table data you need to print result of query

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement