php-pdf -table creation
<p>I am trying to create a table with fpdf
but the inputs of my table is quite big so its not fitting in one cell and i dont know how to push that data into next line without distorting the table structure.</p>

<p>I tried using multicell to..which did not work.</p>

<p>i used this code</p>

<pre><code>function table_2($header,$data)

{
    // Colors, line width and bold font
    $this-&gt;SetFillColor(255,0,0);
    $this-&gt;SetTextColor(255);
    $this-&gt;SetDrawColor(128,0,0);
    $this-&gt;SetLineWidth(.3);
    $this-&gt;SetFont('','B',5);
    // Header
    $w = array(8, 90, 90);
    for($i=0;$i&lt;count($header);$i++)
        $this-&gt;Cell($w[$i],7,$header[$i],1,0,'C',true);
    $this-&gt;Ln();
    // Color and font restoration
    $this-&gt;SetFillColor(224,235,255);
    $this-&gt;SetTextColor(0);
    $this-&gt;SetFont('');
    // Data
    $fill = false;
    foreach($data as $row)
    {
        $this-&gt;Cell($w[0],6,$row[0],1,0,'L',$fill);
        $this-&gt;Cell($w[1],6,$row[1],1,0,'J',$fill);
        $this-&gt;Cell($w[1],6,$row[2],1,0,'J',$fill);
        //$this-&gt;Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
        //$this-&gt;Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
        $this-&gt;Ln();
        $fill = !$fill;
    }
    // Closing line
    $this-&gt;Cell(array_sum($w),0,'','T');
}
</code></pre>

<p>can anyone help me with this?</p>
