...

View Full Version : FPDF and arrays



happikoto
09-16-2011, 09:23 PM
I posted this question somewhere also but..

I'm trying to use FPDF to merge data into a PDF. The data in the example is



require('fpdm.php');

$fields = array(
"name" => "Bill Joe",
"address" => "123 street",
"city" => "place",
"phone" => "555-555-5555"
);

$pdf = new FPDM('template.pdf');
$pdf->Load($fields);
$pdf->Merge();
$pdf->Output();


And it merges just fine. What I'm trying to do with this is bring in data from a query to populate an array. So what the field company_name goes to the pdf field company name. The issue I'm having is creating the array. Any ideas?

Inigoesdr
09-16-2011, 11:31 PM
What I'm trying to do with this is bring in data from a query to populate an array. So what the field company_name goes to the pdf field company name. The issue I'm having is creating the array. Any ideas?
I have an idea. Show us your code where you run the query and tell us the field names so we can point you in the right direction. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum