PHP Tutorials

Whether just getting started or an expert, this vast collection of PHP tutorials will help you create dynamic content for powerful web-based applications in no time.

Results via Envato Market

By Stefan Wiesendanger on December 17, 2000 Introduction In this tutorial, I will give ideas on how the graphics capabilities of PHP can be used to create simple bar charts in GIF and PNG format. I will briefly touch on non-graphics alternatives as well. My objective is to show you…

By Stefan Wiesendanger on December 17, 2000 Related Samples One of many excellent code repositories for PHP sniplets is at px.sklar.com. The “Graphics” section features the following chart-related items. I’ve added sample output each time. “Bar charts” by Afan Ottenheimer. Similar in nature to what is described in this tutorial….

By Stefan Wiesendanger on December 17, 2000 Alternatives PHP wouldn’t be PHP if there were no other ways to achieve similar effects, without having to rely on graphics and the GD library. The simplest solution is to print a number of stars (*) proportional to the value you want to…

By Stefan Wiesendanger on December 17, 2000 How To Generate The Image Now that I’ve kept you waiting for so long, on to create that image! The source code below shows the general stub for creating an image in PHP. Let’s define the image’s $width and $height first, since you’ll…

By Stefan Wiesendanger on December 17, 2000 Plotting Vertical Columns And X Labels Plotting the labels is basically just a repetition of what’s been done before for the Y axis, with slightly changing X and Y positions. The only thing to consider is that if the labels (i.e. the array…

By Stefan Wiesendanger on December 17, 2000 Performance Issues Now that you can generate graphics on the fly, you might worry (and rightly so) that this could bring your server to its knees. If your site is low-traffic, the problem is marginal. Generating an image like the one above takes…

By Stefan Wiesendanger on December 17, 2000 Adding A Title Remember how your science teacher would always bug you about labels and units? Well, both really are important, so let’s add a title using built-in font number 3 (out of 1..5). Fonts other than numbers 1-5 have to be loaded…