I am not sure if there is an easy way, but php isn't really used for that. Just google grapghing in php. I found:
First Choice Second Choice
These look good, but I've never tried them, so it's up to you.
I also found a site which shows how to do it using php, but it's a little more involved and produces much lower quality graphs:
http://www.phpbuilder.com/columns/al...30.php3?page=1
Just under the article there is a [Next Page] link, I didn't notice it till later, but there is 5 pages on how to do it.
I know I've just been googling for you, but in an answer, to get good graphs, you will need to go outside of php.