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 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) . '...'; 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! 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
Archived
This topic is now archived and is closed to further replies.