I'm trying to make my script show text, but if its long it will attempt to shorten it.
Example:
"This is a really long title"
be shortened to "This is a..."
Right now I'm just shortening it to the first 10 characters, but it can still leave the text field I'm using if you use all large characters, or be too small. Example:
QQQQQQQQQQ
iiiiiiiiii
Those are both 10 characters. Is there a way to detect the width of a character with the PHP GD, such as write a text string to an image and output the width of the image? I looked through the GD manual and this is all I can find. I have no idea what its for, but I don't think its what I need.
http://us.php.net/manual/en/function.imagefontwidth.php