title: Wrap Text in Fpdf in Php
body: <p>I am trying to Wrap a text in the Cell using FPDF. 
  here is my code.</p>
  
  <pre><code>&lt;?php
  require('fpdf.php');
  
  $pdf = new FPDF();
  
  $pdf-&gt;AddPage();
  $pdf-&gt;SetFont('Arial','',16);
  $pdf-&gt;Cell(20,7,'Hi1',1);
  $pdf-&gt;Cell(20,7,'Hi2',1);
  $pdf-&gt;Cell(20,7,'Hi3',1);
  
  $pdf-&gt;Ln();
  
  $pdf-&gt;Cell(20,7,'Hi4',1);
  $pdf-&gt;Cell(20,7,'Hi5(xtra)',1);
  $pdf-&gt;Cell(20,7,'Hi5',1);
  
  $pdf-&gt;Output();
  ?&gt;
  </code></pre>
  
  <p>The output for this code looks like this <img src="https://i.stack.imgur.com/GnTOc.jpg" alt="enter image description here"></p>
  
  <p>Now I want to Wrap that Xtra text which is there into the Cell. The xtra text should go into the second line.  How  should I do that.</p>
  
  <p>when I use MultiCell for that line $pdf->MultiCell( 20, 7, 'Hi5(xtra)', 1); It is changing into the following..
  <img src="https://i.stack.imgur.com/iKl3E.jpg" alt="enter image description here"></p>
  
  <p>I have tried the Answer mentioned by Log1c It came out this way
  <img src="https://i.stack.imgur.com/DSl5a.jpg" alt="enter image description here"></p>