Conosco PHP ma meno le classi per cui ho difficoltà per fare questa cosa:

1) ho un classe che genera un barcode a partire dal testo che si passa http://www.barcodephp.com/index.php

Codice PHP:
<?php
// Including all required classes
require('class/BCGFont.php');
require(
'class/BCGColor.php');
require(
'class/BCGDrawing.php'); 

// Including the barcode technology
include('class/BCGcode39.barcode.php'); 

// Loading Font
$font = new BCGFont('./class/font/Arial.ttf'18);

// The arguments are R, G, B for color.
$color_black = new BCGColor(000);
$color_white = new BCGColor(255255255); 

$code = new BCGcode39();
$code->setScale(2); // Resolution
$code->setThickness(30); // Thickness
$code->setForegroundColor($color_black); // Color of bars
$code->setBackgroundColor($color_white); // Color of spaces
$code->setFont($font); // Font (or 0)
$code->parse('HELLO'); // Text


/* Here is the list of the arguments
1 - Filename (empty : display on screen)
2 - Background color */
$drawing = new BCGDrawing(''$color_white);
$drawing->setBarcode($code);
$drawing->draw();

// Header that says it is an image (remove it if you save the barcode to a file)
header('Content-Type: image/png');

// Draw (or save) the image into PNG format.
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>
2) Ho un elenco che prelevo dal database e creo una tabella con nome e vicino voglio avere il codice a barre

Dato che la classe mi passa un header al momento ho risolto mettendo richiamando la classe in un iframe da un'altra pagina.

Come posso sfruttare questa classe per far ciclare in modo da creare nella stessa pagina più codici a barre?

Grazie
ciao