ted_chou12 Posted December 23, 2006 Share Posted December 23, 2006 if I have a text:[code]News: We are constantly trying to improve phpfreaks and these forums, so feel free to go to the PHPFreaks Comments/Suggestions board and point out anything you'd like to see different! (copyright PHPFREAKS)[/code]and I only want to echo 10 number characters at the most and the rest are left as "...", (looks like this):[code]News: We a...[/code]Thanks for any help providedTed. Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/ Share on other sites More sharing options...
Jessica Posted December 23, 2006 Share Posted December 23, 2006 use substr(): http://php.net/substrthen just ."..."; Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/#findComment-147028 Share on other sites More sharing options...
ted_chou12 Posted December 23, 2006 Author Share Posted December 23, 2006 thanks :D I got it working!Ted. Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/#findComment-147037 Share on other sites More sharing options...
Jessica Posted December 23, 2006 Share Posted December 23, 2006 Anytime you want to do stuff with a string, check the documentation on strings and look through the functions ;) Same for arrays, etc. No one is expected to memorize all those functions, that's why they're documented :) Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/#findComment-147040 Share on other sites More sharing options...
ted_chou12 Posted December 23, 2006 Author Share Posted December 23, 2006 okay. Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/#findComment-147042 Share on other sites More sharing options...
kamasheto Posted December 23, 2006 Share Posted December 23, 2006 Or even better, download this >> http://www.php.net/get/php_manual_en.tar.gz/from/a/mirror Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/#findComment-147047 Share on other sites More sharing options...
ted_chou12 Posted December 23, 2006 Author Share Posted December 23, 2006 haha, thanks ;D Quote Link to comment https://forums.phpfreaks.com/topic/31722-solved-limit-echo-character-numbers/#findComment-147066 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.