ERuiz Posted January 15, 2007 Share Posted January 15, 2007 I need to display a text variable but want to limit the amount of characters to only 20 if the variable has more than 20 characters.In other words, if the variable has say 40 characters, I need it to display this:The quick brown fox ...How can this be done?ERuiz Link to comment https://forums.phpfreaks.com/topic/34203-limit-characters-displayed/ Share on other sites More sharing options...
utexas_pjm Posted January 15, 2007 Share Posted January 15, 2007 http://www.php.net/substr Link to comment https://forums.phpfreaks.com/topic/34203-limit-characters-displayed/#findComment-160914 Share on other sites More sharing options...
ERuiz Posted January 15, 2007 Author Share Posted January 15, 2007 Thanks!!! Link to comment https://forums.phpfreaks.com/topic/34203-limit-characters-displayed/#findComment-160915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.