johnathanamber Posted February 17, 2010 Share Posted February 17, 2010 Ok, does that make any sense!??! I have this link: index.php?option=com_comprofiler&task=emailUser&uid=##&Itemid=74 I want to remove specifically the following: index.php?option=com_comprofiler&task=emailUser&uid= and &Itemid=74 So all I have left is: ## What is the best way to do this? Thank you very much and God bless, Johnathan Link to comment https://forums.phpfreaks.com/topic/192416-remove-specific-string-from-a-string/ Share on other sites More sharing options...
gwolgamott Posted February 17, 2010 Share Posted February 17, 2010 http://www.w3schools.com/PHP/php_ref_string.asp specifically using the substr_replace() function may be what you are looking for. Link to comment https://forums.phpfreaks.com/topic/192416-remove-specific-string-from-a-string/#findComment-1013871 Share on other sites More sharing options...
jl5501 Posted February 17, 2010 Share Posted February 17, 2010 if all your strings are urls, like the example, then you need to look at parse_url() http://php.net/manual/en/function.parse-url.php Link to comment https://forums.phpfreaks.com/topic/192416-remove-specific-string-from-a-string/#findComment-1013879 Share on other sites More sharing options...
gwolgamott Posted February 17, 2010 Share Posted February 17, 2010 Cool, I didn't know that function existed. Link to comment https://forums.phpfreaks.com/topic/192416-remove-specific-string-from-a-string/#findComment-1013892 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.