Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7576107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:50:36+00:00 2026-05-30T16:50:36+00:00

I have inserted some text in the WriteHTML function provided by http://www.fpdf.org/ under ‘Tutorial

  • 0

I have inserted some text in the WriteHTML function provided by http://www.fpdf.org/ under ‘Tutorial 6: Links and flowing text’.

I want to add some php code inside of it but it does not quite function.

I tried the following but it just wrote the code too.

while ($row = mysql_fetch_array($result)) {

$html='Person:<b>".$row["firstname"] ." ". $row["lastname"]."</b>';

$pdf->AddPage();    
$pdf->SetXY(12, 127); 
$pdf->SetFontSize(11);
$pdf->WriteHTML(utf8_decode($html));
} $pdf->Output();

Any ideas? Is there any function in existance that can make this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:50:37+00:00Added an answer on May 30, 2026 at 4:50 pm

    Always be consistent with the use of quotes. If you open with a single-quote, close with a single-quote and if you open with a double-quote, close with a double-quote. Change the code to the following and it should work.

    while ($row = mysql_fetch_array($result)) {
    
    $html="Person:<b>".htmlspecialchars($row["firstname"])." ".htmlspecialchars($row["lastname"])."</b>";
    
    $pdf->AddPage();    
    $pdf->SetXY(12, 127); 
    $pdf->SetFontSize(11);
    $pdf->WriteHTML(utf8_decode($html));
    } $pdf->Output();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code where a <script type=text/javascript> block is dynamically inserted. This block
I have inserted a div with some text into a parent div tag on
I have tables with latin1_swedish_ci column. I've done tests and inserted into them some
I don't have ID's to look at since some rows are inserted dynamically via
I have a textarea and among free text input I insert some tags that
I have an NSButton (Push Button) with some temporary title text built in Interface
Hi all i have a text file saved with some data as follows 101011111111101111111111009100954A094101
I have inserted a code to display product attribute in view.phptml, which works fine.
I have inserted the following line into my Joomla template: <jdoc:include type=component /> This
I have a iframe on my page. I have inserted a background image on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.