Hi,
Im currently using fpdf to generate an auto report, but im having an issue with overflow on the notes column, as this can be anything from 1 to 300 words.
i can count the words using the following script, but im struggling to find out how to limit the number of words per line (so no overflow).
function adv_count_words($str)
{
$words = 0;
$str = eregi_replace(" +", " ", $str);
$array = explode(" ", $str);
for($i=0;$i < count($array);$i++)
{
if (eregi("[0-9A-Za-zÀ-ÖØ-öø-ÿ]", $array[$i]))
$words++;
}
return $words;
}
// this next like is used to output into the pdf
$pdf->Cell(0,10,$words,0,1);