Darkwoods Posted November 15, 2010 Share Posted November 15, 2010 Hey... I'm trying to echo the title of the news in the right column but I just want to display maximum of 25 characters how can I do it? thanks Quote Link to comment https://forums.phpfreaks.com/topic/218727-how-to-echo-only-specific-number-of-characters/ Share on other sites More sharing options...
Pikachu2000 Posted November 15, 2010 Share Posted November 15, 2010 substr() Quote Link to comment https://forums.phpfreaks.com/topic/218727-how-to-echo-only-specific-number-of-characters/#findComment-1134423 Share on other sites More sharing options...
Darkwoods Posted November 15, 2010 Author Share Posted November 15, 2010 ah thanks that's how i did it <?php echo substr($news_title,0,25); ?> thanl for helping me out... Quote Link to comment https://forums.phpfreaks.com/topic/218727-how-to-echo-only-specific-number-of-characters/#findComment-1134438 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.