Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Benjamin Adam's Blog:
Creating Graphs in PHP
May 18, 2005 @ 19:02:59

Benjamin Adam has a new little tutorial posted over on his blog for anyone interested in creating graphs with PHP.

Even though only a couple of "actual people" asked me, I thought it might still be helpful to hit the highlights of what I learned about graphing in PHP. [...] I remember a couple of years ago when I tried something like this it was a lot harder. I'm guessing it's because PHP5 PHP4.3.10's default GD library of image functions has gotten better - but I'm not positive. Maybe I'm just smarter...ha!

He demonstrates the use of the GD functionality in his PHP build to create a simple line graph image. Using the imagecreatefrompng, imagecolorallocate, imagettftext, and imageline functions, he creates a sample graph charting information from his database. He doesn't give much in the way of code, but it gives a good general idea of the process behind the script.

tagged:

Link:


Trending Topics: