Jump to content

FPDF 3 Columns


kahodges

Recommended Posts

I have the FPDF script where it prints out the 3 columns, but I need a little help with the code to get it to pull the first and last name with the suffix together out of mysql, and echo it to one column. This is the code I have now:

 

 
$pdf=new PDF(); 
$pdf->AddPage(); 
//specify 3 columns 
$pdf->Image('images/mylogo.gif',100,0,10,10,'','http://www.mysite.com'); 
$pdf->AddCol('"first_name". "last_name". "suffix"',55,'Name','L'); 
$pdf->AddCol('nextel',30, 'Nextel','C'); 
$pdf->AddCol('cellphonenum',28,'Cell Number','R'); 
$prop=array('HeaderColor'=>array(255,150,100), 
'color1'=>array(210,245,255), 
'color2'=>array(255,255,210), 
'padding'=>2); 
$pdf->Table('SELECT first_name, last_name, suffix, nextel, cellphonenum from employees WHERE nextel is not null ORDER by employee_name'); 
$pdf->Output(); 

 

Can someone please let me know how I should code the line to combine the three mysql fields into one column and echo? The other two columns echo fine.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/194127-fpdf-3-columns/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.