I have a long text string that wraps in a document. I need to be able to count how many lines of text that string creates. I tried the following:
floor((strlen($mystring) + 16) / 115)
Where label preceding string has 16 chars;
115 - average chars per line.
Unfortunately floor gives me whole lines only, which is incorrect, as even a few chars make a whole new line. How do I get correct count?