sandy1028 Posted April 30, 2009 Share Posted April 30, 2009 Hi, How to remove only the /p in the string. i.e remove only single charter /p. http://mysqite.com/p/parrot.html. After removing the string should be http://mysqite.com/parrot.html Link to comment https://forums.phpfreaks.com/topic/156227-remove-the-string/ Share on other sites More sharing options...
avvllvva Posted April 30, 2009 Share Posted April 30, 2009 <?php $str = 'http://mysqite.com/p/parrot.html.'; $str_new = str_replace('/p/','/',$str); ?> Link to comment https://forums.phpfreaks.com/topic/156227-remove-the-string/#findComment-822473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.