help regarding regular expression
Posted: Mon Jun 02, 2008 11:23 pm
i have a following code......
$msg=addslashes(str_replace("\n","<br>",$message))
message is here text area.
here using str_replace i am replacing newline("\n") with <br> and instead of str_replace i want to do this using regular expression preg_replace.so how will i do it.its urgent thanx in advance
$msg=addslashes(str_replace("\n","<br>",$message))
message is here text area.
here using str_replace i am replacing newline("\n") with <br> and instead of str_replace i want to do this using regular expression preg_replace.so how will i do it.its urgent thanx in advance