Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.