mike1313 Posted March 22, 2007 Share Posted March 22, 2007 I have a chat room. I need help with this. $do_pm = preg_replace("|/pm *|", "", $decode); I'm replacing what's after /pm. Say /pm 45 is there anyway I can find out whats entered after 45? preferrrably by using preg_replace? or some other method. Any help is appreciated. Link to comment https://forums.phpfreaks.com/topic/43782-preg_replace-help/ Share on other sites More sharing options...
desithugg Posted March 22, 2007 Share Posted March 22, 2007 I have a chat room. I need help with this. $do_pm = preg_replace("|/pm *|", "", $decode); I'm replacing what's after /pm. Say /pm 45 is there anyway I can find out whats entered after 45? preferrrably by using preg_replace? or some other method. Any help is appreciated. <? $filter=array( $bbcode = array( "'|/pm(.*?)|'is" => "replace with", "'|/pm(.*?)|'is" => "replace with", "'|/pm(.*?)|'is" => "replace with", ); $decode = preg_replace (array_keys($bbcode), array_values($bbcode), $decode); ?> umm try something like that I didn't test it Link to comment https://forums.phpfreaks.com/topic/43782-preg_replace-help/#findComment-212570 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.