Originally Posted by
RoGuE|SaBeR
Think I have a vague idea whats happening...
Couldn't quickly break it down for me? A guy has to learn
Code:
Function nl2br(txt) 'pass the text block you want to convert as parameter txt to function nl2br
rslt = txt 'assign paramater to local variable
rslt = Replace(rslt,vbcrlf,"<br>") 'replace crlf's with breaks
rslt = Replace(rslt,"<br><br>","</p><p>") 'replace two breaks with a new paragraph
rslt = "<p>" & rslt & "</p>" 'put paragraph tags around the result
nl2br = rslt 'output result
End function