Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Roberto  >  array_to_image  >  test.php  >  Download  
File: test.php
Role: ???
Content type: text/plain
Description: How to use the class
Class: array_to_image
Author: By
Last change:
Date: 2002-01-02 11:25
Size: 884 bytes
 

Contents

Class file image Download
<?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();

?>