I think you will find that \n works when using the CLI version of php. i.e. the command-line version fom the shell.
The html-embedded version requires you to use < br/>, as this is what is recognised as a line feed in html. HTH Keith In theory, theory and practice are the same; In practice they are not. On Sat, 4 Feb 2006, Harry Baya wrote: > To: php-install@lists.php.net > From: Harry Baya <[EMAIL PROTECTED]> > Subject: [PHP-INSTALL] Begginer's Questions... > > I gather there is an archive for this listServ. How do I get to it? I > will explore on my own. > > The question I joined this listServ to ask is below. Please let me know > if it should be posted in a different list: > > I have installed PHP and Apache to run locally on my > Windows XP machine. It works! However, when I view a .php > web page (i.e. mixing PHP and HTML) the book I have says > that "\n" used inside double quotes in a print or echo > command should cause a line feed. > > It does not do so for me. If I use <br /> I get a line > feed, but not with \n. See example below. > > <?php > print "I'm just ducky.\n\nhow are you?"; > ?> > > This does NOT put in the line feeds I expect from \n. > Why is that? Can I fix it? Is that a browser setting, or > maybe a PHP setting? > > I noticed that the \t and \r also seem to do nothing. > However \$, \\ and \" seem to work as desired. Oddly I > found that \$ and $ both put a $ in the web page, both \ > and \\ put a single slash in the web page. Help ! > > Harry