On Sat, 12 May 2007, Rafal Z wrote:

To: php-install@lists.php.net From: Rafal Z <[EMAIL PROTECTED]> Subject: [PHP-INSTALL] Problem with echo on freshly installed Apache and PHP

Hallo,

I',m new to PHP. I've installed Apache 2.0.59 and PHP 5.2. It's functionning, but all strings outputed with Echo shows on the same line, even if I include a "\n" at then end of string. Example:

<?php
 Echo "string1";
 Echo "string2";
?>
results in: string1string2 in any browser.

The same result with the following modification:

<?php
 Echo "string1\n";
 Echo "string2";
?>

That will work using the CLI version of php.

Using the Apache module version of php, you need to echo something like this:

<?php
 echo "some text line 1<br />";
 echo "some text line 2<br />";
?>

Wherever you see php examples written for the CLI version of php using \n, you will need to use <br /> instead, to make new lines appear in the browser.

Regards

Keith

------------------------------------------------------------
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

This email address is challenge-response protected with
http://www.tmda.net
------------------------------------------------------------

Reply via email to