kahodges Posted March 4, 2010 Share Posted March 4, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/194127-fpdf-3-columns/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.