I have the below code which prints out lines of text as long as the lines aren’t empty:
$textChunk = wordwrap($value, 35, "\n");
foreach(explode("\n", $textChunk) as $textLine)
{
if ($textLine!=='')
{
$page->drawText(strip_tags(ltrim($textLine)), 75, $line, 'UTF-8');
$line -=14;
}
}
I would like to edit it so that it also doesn’t print the line if it begins with ‘T:’
Any ideas?
Use substr to check the first two characters: