devWhiz Posted April 23, 2011 Share Posted April 23, 2011 so if I have a a string of text or something like http://www.yahoo.com/ajhsijd908340 I can use str_replace to remove "http://" but what can I use to remove the "ajhsijd908340" if every time it is a different set of characters? Quote Link to comment https://forums.phpfreaks.com/topic/234515-delete-everything-after-a-certain-character/ Share on other sites More sharing options...
Pikachu2000 Posted April 23, 2011 Share Posted April 23, 2011 You could use parse_url to get the part you want. Quote Link to comment https://forums.phpfreaks.com/topic/234515-delete-everything-after-a-certain-character/#findComment-1205223 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.