almightyegg Posted October 24, 2007 Share Posted October 24, 2007 I have a bit of code that selects the first 5 words of a variable: $short = join(' ', array_slice (explode(' ', $posmes['message']), 0, 5)); Works great, butI want it to select the first 30 Characters instead...How do I change it from words to characters?? Link to comment https://forums.phpfreaks.com/topic/74592-solved-problm-select-first-parts-of-variable/ Share on other sites More sharing options...
Wuhtzu Posted October 24, 2007 Share Posted October 24, 2007 http://dk2.php.net/substr Link to comment https://forums.phpfreaks.com/topic/74592-solved-problm-select-first-parts-of-variable/#findComment-377018 Share on other sites More sharing options...
almightyegg Posted October 24, 2007 Author Share Posted October 24, 2007 thanks thaworked a treat Link to comment https://forums.phpfreaks.com/topic/74592-solved-problm-select-first-parts-of-variable/#findComment-377055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.