Is there a clean way (no hardcoding) in which I can dump all the contents of a database directly to HTML using PHP?
I don’t want to run queries for every table and step through the results, outputting them. I need this for testing purposes, so the tables aren’t that big.
Any hints?
I want this done directly in my php file, where the rest of the test takes place, so that I may compare with the sample. I need to do this automatically, so can’t really use tools like PHPMyAdmin.
Something like this ought to work:
//ADDING a loop to dump the whole db: