Re: "\n" in PHP
From: Lc (hoho_at_not.me)
Date: 07/12/04
- Next message: Chris Hope: "Re: XML over CSS"
- Previous message: Manuel Lemos: "Re: html e-mail seding problem with php..."
- In reply to: Michael Austin: "Re: "\n" in PHP"
- Next in thread: Michael Austin: "Re: "\n" in PHP"
- Reply: Michael Austin: "Re: "\n" in PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 12 Jul 2004 06:39:25 +0200
Michael, could you give us an example of "pre pre tag"? tx,
"Michael Austin" <maustin@firstdbasource.com> a écrit dans le message de
news:6djIc.14616$v73.1473@newssvr24.news.prodigy.com...
> Andy Hassall wrote:
>
> > On Sun, 11 Jul 2004 17:48:44 GMT, Mudge <mark1822@hotmail.com> wrote:
> >
> >
> >>I am reading a book called "PHP, Apache, MySQL Web Development"
> >>http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764557440.html
> >>
> >>and in its example code it sometimes will have a "\n" in it. It is
driving
> >>me crazy because php will ignore the "\n"s so i have no idea why this
book
> >>has them in there. Does anybody know?
> >
> >
> > What makes you think PHP will ignore the "\n"s? It does not.
> >
> >
> >>For example:
> >>
> >>if (mysql_num_rows($result))
> >>{
> >> echo "<div class=\"scroller\">\n";
> >>
> >>Why does the book put the "\n"s in there?
> >
> >
> > To make the produced HTML source easier to read, most likely.
> >
> > Although if they were concerned about readability they'd consider using
single
> > quotes instead of doubles, and avoiding all those backslashes.
> >
> > Maybe you're thinking of the fact that newlines aren't significant in
HTML,
> > i.e. it won't force a new line in the rendered output.
>
> unless of course you are using pre /pre tags then it will render the
> data on the next line...
>
> >
> > --
> > Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool
> > http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
>
> Michael Austin.
- Next message: Chris Hope: "Re: XML over CSS"
- Previous message: Manuel Lemos: "Re: html e-mail seding problem with php..."
- In reply to: Michael Austin: "Re: "\n" in PHP"
- Next in thread: Michael Austin: "Re: "\n" in PHP"
- Reply: Michael Austin: "Re: "\n" in PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|