me102 Posted July 8, 2007 Share Posted July 8, 2007 Helllo everyone, I was wondering how i would trim down some text to 8 chars. For ex. sdf54sf5d4f would be trimed down to sdf54sf5 and qweqwoehqw would be trim down to qweqwoeh. Link to comment https://forums.phpfreaks.com/topic/58987-solved-trim-down-a-word/ Share on other sites More sharing options...
AndyB Posted July 8, 2007 Share Posted July 8, 2007 http://ca.php.net/manual/en/function.substr.php Link to comment https://forums.phpfreaks.com/topic/58987-solved-trim-down-a-word/#findComment-292720 Share on other sites More sharing options...
me102 Posted July 8, 2007 Author Share Posted July 8, 2007 Would I put? substr("abcdef", 0, ; Link to comment https://forums.phpfreaks.com/topic/58987-solved-trim-down-a-word/#findComment-292726 Share on other sites More sharing options...
AndyB Posted July 8, 2007 Share Posted July 8, 2007 For example $short_string = substr($long_string,0,; echo $long_string. " trimmed to ". $short_string; Link to comment https://forums.phpfreaks.com/topic/58987-solved-trim-down-a-word/#findComment-292729 Share on other sites More sharing options...
me102 Posted July 8, 2007 Author Share Posted July 8, 2007 Thanks that worked greate. Link to comment https://forums.phpfreaks.com/topic/58987-solved-trim-down-a-word/#findComment-292736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.