RE: [PHP] Beginner's attempt fails
| From: | Jeffrey A Schoolcraft | Date: | Tue, 17 Oct 2000 15:37:22 +0000 |
| Subject: | RE: [PHP] Beginner's attempt fails | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20649@lists.php.net to get a copy of this message | ||
line break woes:
I imagine that the line break did work, if you go view your source.
However, a \n != <BR> when html is rendered.
> -----Original Message-----
> From: Michael Talbot-Wilson [mailto:mtw@birdseye.view.net.au]
> Sent: Tuesday, October 17, 2000 11:31 AM
> To: php-general@lists.php.net
> Subject: [PHP] Beginner's attempt fails
>
>
> Well, in the end I got the php 4.0.2 module compiled into Apache
> 1.3.12 on Linux. But in the second little document I wrote the
> linefeed escape doesn't work. The '\n' disappears from the text
> but the lines don't get broken. See output below, and the pgp
> that produced it further below.
>
> Is there something here that I've failed to understand? (The
> choice of browser, Netscape/Linux, Lynx/Linux, Microsoft
> browser, doesn't make any difference.)
>
> --Mike
>
> -----------------------------------------------------------------
>
> Here comes php.
>
> Hello from php. This should be the second line. And this should be the
> third. And this the fourth.
>
> -----------------------------------------------------------------
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>
> "http://www.w3.org/TR/xhtml1/DTD/strict.dtd">
> <html
> xmlns="http://www.w3.org/1999/xhtml"
> xml:lang="en" lang="en">
> <head>
> <title>Simple PHP</title>
> <meta http-equiv="Content-type"
> content='text/html; charset="ISO-8859-1"'
> />
> </head>
> <body>
>
> <p>Here comes php.</p>
>
> <p>
> <?php
> echo("Hello from php.\n");
> echo "This should be the second line.\n";
> echo "And this should be the third.\n";
> echo "And this the fourth.\n";
> ?>
> </p>
>
> </body>
> </html>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net