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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
me102 Posted July 8, 2007 Author Share Posted July 8, 2007 Would I put? substr("abcdef", 0, ; Quote Link to comment 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; Quote Link to comment Share on other sites More sharing options...
me102 Posted July 8, 2007 Author Share Posted July 8, 2007 Thanks that worked greate. Quote Link to comment 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.