Answer the question
In order to leave comments, you need to log in
How to correctly draw a rectangular background under the text?
How to correctly draw a rectangular background under the text. It's not a problem to draw through imagefilledrectangle, but what about when the text is wrapped.
I transfer it this way:
if($box[2] > $width - $margin*2){
$text_new .= "\n".$word.$box[2];
} else {
$text_new .= " ".$word;
}
Answer the question
In order to leave comments, you need to log in
a string into an array, the array is padded in length with spaces
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question