Solarpitch Posted August 18, 2007 Share Posted August 18, 2007 Hi Guys, This is probably an easy one but just looking for a little help. In my resultset I want to limit the number of characters that are display in the field. eg: "This is the text in the result to shorten" to "This is the text in the..." So I want to limit the number of characters when displaying information in the table. Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/65592-solved-limiting-the-number-of-characters-in-a-resultset/ Share on other sites More sharing options...
Fadion Posted August 18, 2007 Share Posted August 18, 2007 u mean? $text = "This is the text in the result to shorten"; echo substr($text, 0, 15) . '...'; Quote Link to comment https://forums.phpfreaks.com/topic/65592-solved-limiting-the-number-of-characters-in-a-resultset/#findComment-327509 Share on other sites More sharing options...
Solarpitch Posted August 18, 2007 Author Share Posted August 18, 2007 Perfect! Thanks very much! Quote Link to comment https://forums.phpfreaks.com/topic/65592-solved-limiting-the-number-of-characters-in-a-resultset/#findComment-327511 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.