Creating a Graph with PHP
Introduction
Diagrams and Graphs are a great way of presenting data to the world. With PHP and the GD library we can create them on-the-fly with just a few lines of code.Starting with an array
<?php
$graph = array(
1 => array(
'title' => 'January',
'value' => 25.9
),
2 => array(
'title' => 'February',
'value' => 37.4
),
3 => array(
'title' => 'March',
'value' => 19.8
)
);
?>
Recommended books on this topic
![]() |
Dynamic Bitmap Graphics with PHP and gd, Second Edition by Jacek Artymiak |
![]() |
Learning PHP 5 by David Sklar |
Comments (0) |

