Restricting number of letters

im writing a script to post the most recent posts on my forum and i want to keep the number of letters in the thread title to a certain point and if it goes over i want to put a “…” Can someone tell me how to do this? im using php