title: How to create pdf using array values in php
body: <p>Hello everybody i am new fpdf. I have multiple array values and create a table.</p>
  
  <pre><code>$array1=[1,2,3];
  $array2=['apple', "ball", "cat"];
  </code></pre>
  
  <p>I want to create a table using this values</p>
  
  <pre><code>Numbers Animals
  1       Apple
  2       Ball
  3       Cat
  </code></pre>
  
  <p>I have tried this way but all values are printing one by one</p>
  
  <pre><code>require('fpdf.php');
  $pdf = new FPDF();
  $pdf-&gt;AddPage();
  $pdf-&gt;SetFont('Arial','B',10);
  
  for ($i=0; $i &lt; count($array1); $i++) { 
      [$pdf-&gt;MultiCell(30,12,$array1[$i],1), $pdf-&gt;MultiCell(30,12,$array2[$i],1)];
      }
  $pdf-&gt;Output();
  </code></pre>
  
  <p>Can anyone suggestion me how this problem.
  Thanks in advance.</p>