OHLÁLÁ OHLÁLÁ - 2 years ago 103
PHP Question

Text length in php

I have a text and I want to cut this in the end of the line, I don't want a page break, with Arial it's easy to do because all font size is the same, but I'm using a font type where the fonts size is very different, for example i and w. So it's hard to determine the size of the text in the screen,

What is the easiest way to do this, on the server side (php, imagettfbbox) or on the client side (javascript, jQuery)?

Answer Source


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download