Re: Perl & PHP output format mismatching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/15/06, mickb@xxxxxxx <mickb@xxxxxxx> wrote:
Hello,

I'm currently writing a PHP page, which uses a small Perl script. But I
encounter an annoying problem with endline character.

A small example :

$perl = new Perl();
$perl->eval('print "toto\ntata"');

In this configuration, the HTML page generated sends me :
toto tata

Of course and you should have understood already :-), I would like :
toto
tata

I suppose I have to do a little manipulation on the PHP streams to make them
correctly interpret the endline character returned by Perl. But I didn't find
what :(

\n is not html so your browser doesn't know you want a newline. What
you need is a <br> tag.

See http://www.php.net/nl2br

--
Postgresql & php tutorials
http://www.designmagick.com/

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux