krio Posted August 29, 2009 Share Posted August 29, 2009 Hello, I want to keep only the last 4 characters of a string and remove all others I have seen string replacement etc and explode, but I cant get them to do what I want Thanks Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 29, 2009 Share Posted August 29, 2009 $new_string = substr($old_string, -4); 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.