Page 1 of 1

PHP to PDF

Posted: Mon Apr 19, 2010 11:33 pm
by SpiritWebb
Is there a way to run a php script to dump a database table from MySQL into a PDF, or XLS? I am trying to find a way to do it, without actually going into phpmyAdmin and manually doing it. I have one script that exports it into excel, but it doesn't make it all nice and neat as if you were going to do via manually.

Can anyone point me in the right direction to do this? I have searched everywhere and cannot find much of anything. (I am using WAMP)

Re: PHP to PDF

Posted: Tue Apr 20, 2010 3:36 am
by Jackolantern
Here is a pretty nice looking tutorial for generating PDF files dynamically with PHP. You would likely have to iterate through the database data manually, but it should not be too hard using foreach statements and some well-placed looping constructs. You would also probably want to do that yourself to make sure it is formatted how you like.