Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: FPDF and arrays

  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FPDF and arrays

    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

    PHP Code:
    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?

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    Quote Originally Posted by happikoto View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •