On Mon, 25 Aug 2003, The Cossins Fam wrote:

} I've tried the nl2br function, as well as adding "\n" to the end of each 
} line and using fgets to replace "\n" with "<br>".  However, nothing seems to 
} be working.  I'm probably missing something very simple, but if someone 
} wouldn't mind helping a rookie out, I'd appreciate it.

If the files were written under Windows/UNIX/Mac OS 9-, you will need to 
add more than just "\n" to your ereg_replace:

$message = ereg_replace("(\r\n|\n|\r)", "<br>\n", $message);

This should take care of all 3 kinds of line breaks/form feeds [windows, 
Mac, and UNIX based systems all define what happens when the user hits the 
"return/enter" key differently].


Vince LaMonica               UC Irvine,  School  of  Social Ecology
 W3 Developer       <*>      116 Social Ecology I, Irvine, CA 92697
 [EMAIL PROTECTED]                  http://www.seweb.uci.edu/techsupport

        You should not confuse your career with your life.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to