Pi_Mastuh Posted December 15, 2006 Share Posted December 15, 2006 I'm working on my messaging system and when you reply I have it add RE: to the subject, however now there're messages that're RE:RE:RE:RE:RE:RE:___ etc, Is there a way for it to tell it to add RE: only if it's not there? Link to comment https://forums.phpfreaks.com/topic/30809-simple-question/ Share on other sites More sharing options...
complex05 Posted December 15, 2006 Share Posted December 15, 2006 if(substr($string,0,3) != "Re:"){ $string = "Re: $string";} else { $string = $string;} echo $string; Link to comment https://forums.phpfreaks.com/topic/30809-simple-question/#findComment-142048 Share on other sites More sharing options...
Psycho Posted December 15, 2006 Share Posted December 15, 2006 $subject .= (substr($subject, 0, 4)!="RE: ")?"RE: ".$subject:$subject; Link to comment https://forums.phpfreaks.com/topic/30809-simple-question/#findComment-142050 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.