3raser Posted March 3, 2011 Share Posted March 3, 2011 I have a field in my database called description. How can I echo out only 500 out of the 2000 max characters? Like for example: $query = mysql_query("SELECT description FROM `servers` ORDER BY votes DESC LIMIT 5"); If I were to echo out the value of description for the database, how can I only echo out the first 500 characters? Link to comment https://forums.phpfreaks.com/topic/229462-is-there-a-way-to-display-a-certain-amount-of-text/ Share on other sites More sharing options...
Pikachu2000 Posted March 3, 2011 Share Posted March 3, 2011 substr() Link to comment https://forums.phpfreaks.com/topic/229462-is-there-a-way-to-display-a-certain-amount-of-text/#findComment-1182236 Share on other sites More sharing options...
3raser Posted March 3, 2011 Author Share Posted March 3, 2011 substr() Thank you. And where is the mark solved button? Link to comment https://forums.phpfreaks.com/topic/229462-is-there-a-way-to-display-a-certain-amount-of-text/#findComment-1182238 Share on other sites More sharing options...
Pikachu2000 Posted March 3, 2011 Share Posted March 3, 2011 It's temporarily unavailable, due to the recent forum upgrade . . . Link to comment https://forums.phpfreaks.com/topic/229462-is-there-a-way-to-display-a-certain-amount-of-text/#findComment-1182239 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.