shadiadiph Posted May 29, 2009 Share Posted May 29, 2009 I have been trying this to replace a forward slash but it isn't working? $pageid = stripslashes($_SERVER['PHP_SELF']); $pattern = '///'; $newpageid = preg_replace($pattern,'', $pageid); Link to comment https://forums.phpfreaks.com/topic/160134-solved-how-to-preg_replace-a-slash/ Share on other sites More sharing options...
ToonMariner Posted May 29, 2009 Share Posted May 29, 2009 $pageid = stripslashes($_SERVER['PHP_SELF']); $pattern = '/\//'; $newpageid = preg_replace($pattern,'', $pageid); Link to comment https://forums.phpfreaks.com/topic/160134-solved-how-to-preg_replace-a-slash/#findComment-844861 Share on other sites More sharing options...
shadiadiph Posted May 29, 2009 Author Share Posted May 29, 2009 thank you so much that was confusing me Link to comment https://forums.phpfreaks.com/topic/160134-solved-how-to-preg_replace-a-slash/#findComment-844862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.