Very simple code generate dynamic table.
Here is the code.
PHP code get requested number of columns and rows through loops and then simply display the table.
You always can make it more attractive by adding CSS styles.
For any queries or any new code requests comment below in the comment section.