Notoriouswow Posted July 18, 2010 Share Posted July 18, 2010 Hello phpfreaks, I have a self coded forums (Yes, it is mine, it is not 3rd party) Would like to know how I would make it so that after a certain amount of characters a topic would stop and end in '...' without the quotes obviously. If you need the code, just ask. Thanks in Advance, NotoriousWoW Quote Link to comment Share on other sites More sharing options...
Mchl Posted July 18, 2010 Share Posted July 18, 2010 $maxLen = 85; if(strlen($topic) > $maxLen) { $topic = substr($topic,0,$maxLen-3).'...'; } echo $topic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.