mcmuney Posted March 22, 2006 Share Posted March 22, 2006 How do I limit result length. For example, if the full result is a full paragraph text, how would I only show, for example, on the first 100 characters of the paragraph? Link to comment https://forums.phpfreaks.com/topic/5544-result-lengh-limit/ Share on other sites More sharing options...
redarrow Posted March 22, 2006 Share Posted March 22, 2006 [!--quoteo(post=357429:date=Mar 22 2006, 10:57 PM:name=mcmuney)--][div class=\'quotetop\']QUOTE(mcmuney @ Mar 22 2006, 10:57 PM) [snapback]357429[/snapback][/div][div class=\'quotemain\'][!--quotec--]How do I limit result length. For example, if the full result is a full paragraph text, how would I only show, for example, on the first 100 characters of the paragraph?[/quote][code]$desc = $_POST['desc']; $text = substr($desc,0,100); echo $text; [/code]This would show only the first 100 characters. Link to comment https://forums.phpfreaks.com/topic/5544-result-lengh-limit/#findComment-19788 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.