Hmm... This works: print string.replace(str, "\n", "<br>") But I can't assign the result into a variable but only print it like the code above. What can I do to assign the repalced string to a variable? Because I Have other string replacements to do with that very same string. Thanks,