Link to home
Start Free TrialLog in
Avatar of eviandell
eviandell

asked on

Carriage return and Line feed in PHP

I have a website developed in DreamweaverMX using PHP/MySQL.  I am testing it locally on a WindowsXP platform with an Apache webserver.

When I output something from a PHP script to a web page, I can never get carriage return or line feed to work.  I have tried every combination of \n and \r I can think of and searched the PHP manual but cannot figure out what I am doing wrong.

Here's a sample of what I'm doing - within a loop, output each time an e-mail has been sent ($mail_to has been set to an email address pulled from the db):

echo "sent email to - $mail_to\r\n";
flush();

The text and variable data come out correctly but just keep appending to the same line and wrapping.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of errows
errows

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eviandell
eviandell

ASKER

Doh! I am such a Watson - you are such a Sherlock!  Thanks heaps!