Welcome to the PHP fold, if there is anything you need, just feel free to bug me.
I've been programming PHP since the early 3.0 days, and doing CGI in C before that, so I know my way around a bit.
Here is some pretty generic and easy code to work with that should let you work a bit faster.
It's totally undocumented, but it should be pretty easy to figure out, overall, I really like it, and end up rewriting it everytime I work for a new company, so I finally rewrote it from scratch and BSD licenced it (so you can do whatever you want with it, I don't care).
Here it is:
http://www.rawb.org/~rawb/phplibs.zip
For a fun first thing to try, after you have the libraries loaded, try:
maketable(dbread("SELECT something FROM somewhere"));