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 Link to comment https://forums.phpfreaks.com/topic/172423-removing-characters-from-a-string/ Share on other sites More sharing options...
Psycho Posted August 29, 2009 Share Posted August 29, 2009 $new_string = substr($old_string, -4); Link to comment https://forums.phpfreaks.com/topic/172423-removing-characters-from-a-string/#findComment-909065 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.