nl2br aggiunge i tag html. se per esempio in scrittura file vuoi fare un chr(13) devi utilizzare nelle parentesi \n