<?php
//include the class
include("class_array_to_image.inc");
//array to be shown as image
$array[head][0]='id';
$array[head][1]='name';
$array[1][0]=1;
$array[1][1]='Robert';
$array[2][0]=2;
$array[2][1]='Frank';
reset($array);
/* params name:
array_to_image(array(), font, cellspacing,
center, max_x, max_y, type,
line_color,
head_bgcolor, head_txt_color,
even_bgcolor, even_txt_color,
odd_bgcolor, odd_txt_color)
*/
//call the costructor whit parameters
$image= new array_to_image($array,3,5,
true,600,600,'png',
"0,0,0",
"128,128,128", "0,0,0",
"230,230,230", "0,0,0",
"255,255,255", "0,0,0");
//set name to give to the image
$name = "testimage";
//store the image
$image->show_image($name);
//to show the image use this:
//$image->show_image();
?>
|