You can also just hijack the source of phpMyAdmin to extract what you need. The code there works well -- if you just want to write a small script to do a specific task, that's a good place to start.
It's not terribly hard to write your own script to do it on your own though. For example, here's pseudocode for outputting all your table data into an HTML page:
For each table in the database,
Output a heading for that table.
Begin an HTML table.
For each column in that table,
Output a table header cell for that column.
Select * from that table.
For each row in the result set,
For each column in the result row,
Output a table cell for that column.