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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/5544-result-lengh-limit/#findComment-19788 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.