title: PHP FPDF Multiple Multicell height adjusting
body: <p>Im trying to make the height of my multicell and other cells adjust to the highest height of a multicell.<a href="https://i.stack.imgur.com/j2EeJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j2EeJ.jpg" alt="enter image description here"></a></p>
  
  <p>this is what my pdf looks like now using the code below. the only problem is i cannot adjust the description column to align with the highest MULTICELL which is SUBCODE. Both SUBCODE and DESCRIPTION are MULTICELL the rest are plain cell.  </p>
  
  <pre><code>$h1 = $pdf-&gt;GetMultiCellHeight(85, 5, $r-&gt;subdesc, $border=null, $align='J');
  $h2 = $pdf-&gt;GetMultiCellHeight(35, 5, $r-&gt;subcode, $border=null, $align='J');
  $height = ($h1 &gt; $h2) ? $h1 : $h2;
  
                  $pdf-&gt;Cell(20,$height,$r-&gt;section,1,0,'L');
                  $pdf-&gt;Cell(15,$height,$r-&gt;code,1,0,'L');
                  $subcode = ($r-&gt;wga == 1) ? '*'.$r-&gt;subcode : $r-&gt;subcode;
  
                  $x = $pdf-&gt;GetX();
                  $y = $pdf-&gt;GetY();
                  $pdf-&gt;MultiCell(35, 5, iconv("UTF-8", "ISO-8859-1", $r-&gt;subcode), 1);
                  $pdf-&gt;SetXY($x + 35, $y);
  
                  $x = $pdf-&gt;GetX();
                  $y = $pdf-&gt;GetY();
                  $pdf-&gt;MultiCell(85, 5, iconv("UTF-8", "ISO-8859-1", $r-&gt;subdesc), 1,'L', false);
                  $pdf-&gt;SetXY($x + 85, $y);
  
                  $pdf-&gt;Cell(10,$height,$r-&gt;units,1,0,'C');
                  $pdf-&gt;Cell(10,$height,$r-&gt;grade,1,0,'C');
                  $pdf-&gt;Cell(20,$height,$r-&gt;remark,1,0,'C');
                  $pdf-&gt;Ln();
  </code></pre>