title: FPDF -> PHP - set next column width from database depend of 1st column
body: <p>I've an issue about FPDF to set 2nd width</p>
  
  <p>I've an output like this :
  <a href="https://i.stack.imgur.com/JVuVd.png" rel="nofollow noreferrer">pdf</a></p>
  
  <p>I want to set 2nd column width same like 1st column,</p>
  
  <p>but the problem is about the code, my 1st column showing with <code>while</code> like this:</p>
  
  <pre><code>$pro2 = new Kriteria($db);
  $stmt2 = $pro2-&gt;readAll();
  $stmt2x = $pro2-&gt;readAll();
  $stmt2y = $pro2-&gt;readAll();
  $stmt2yx = $pro2-&gt;readAll();
  
  while ($row2x = $stmt2x-&gt;fetch(PDO::FETCH_ASSOC)){
      $pdf-&gt;Cell($pdf-&gt;GetStringWidth($row2x['nama_kriteria'])+3,5,$row2x['nama_kriteria'],1,0,'L');
  }
  
  while ($row1x = $stmt1x-&gt;fetch(PDO::FETCH_ASSOC)){
      $pdf-&gt;Cell($pdf-&gt;GetStringWidth('Kriteria/Alternatif')+6,7,$row1x['nama_alternatif'],1,0,'L');
      $stmtrx = $pro-&gt;readR($row1x['id_alternatif']);
      while ($rowrx = $stmtrx-&gt;fetch(PDO::FETCH_ASSOC)){
          // $pdf-&gt;Cell($pdf-&gt;GetStringWidth($row2x['nama_kriteria'])+3,5,$rowrx['nilai_rangking'],1,0,'L');
          //want to use this but the $row2x['nama_kriteria'] is used inside top while
          $pdf-&gt;Cell(30,7,$rowrx['nilai_rangking'],1,0,'L');
      }
      $pdf-&gt;ln();
  }
  </code></pre>
  
  <p>I've no idea how to make my 2nd column width is same as 1st column,
  any help would appriciate</p>