Now I'm using:
echo substr( $var, 0, 30 ); if( strlen( $var ) > 30 ) echo "...";
But I'd like to show a specific number of pixels, (not a number of letters) of $var, is that possible?
Thanks!
/Daniel
Not possible with PHP alone. Theres no way to determine how big their font size is set, or even what font they're using.
Maybe with Javascript AND PHP, but even that is iffy.
if your using it in images your best bet is imagefontwidth()