No, that's not good because the /n isn't always going to be 5 characters into the string. Do it like this:
$somestring = "abcd /n abcd /n ";
$somestring = substr_replace ($somestring, "|", strpos ($somestring, "/n"), 2);
PS, you do know that a newline is \n rather than /n, right?