Re: "\n" in PHP

From: Jeffrey Silverman (jeffrey_at_pantsjhu.edu)
Date: 07/12/04


Date: Mon, 12 Jul 2004 17:19:04 -0400

On Mon, 12 Jul 2004 05:13:49 +0000, Mudge wrote:

> I happen to be working through this book right now also. I've noticed,
> at least in the early chapters, that it's basically just a matter of
> style. The newline characters are not always necessary, but sometimes
> they do make the html output a little more readable as other posters
> have already pointed out. If you're curious, write one of the example
> scripts, get it to run, and then go back and remove the newline
> characters and see the difference.

I definitely think the newlines are important. Try writing 1200 lines of
PHP that output HTML *without* newlines and then go back and debug your
output! You will greatly appreciate the additioanl formatting, even if the
actual end-user never sees it in her browser.

> Thanks bonehead. Do you by any chance recommend any other books on PHP
> or CSS or XML?

I'm not bonehead, either. I have, however, found that "PHP and MySQL Web
Development, Second Edition" by Welling/Thompson is very nice.

-- 
    Jeffrey D. Silverman | jeffrey@pantsjhu.edu **
                 Website | http://www.newtnotes.com
(** Drop "pants" to reply by email)


Relevant Pages

  • Re: how to detect the dir to cd to begins with a dot
    ... newline characters. ... Do you mean using eval as the "some trick"? ... one to find out which line each file path starts on. ... newline, backslash, single or double quote characters? ...
    (comp.unix.shell)
  • Re: Invisible Array Loop Counter?
    ... > match before a newline before the end of the string. ... known and/or may contain newline characters. ... that those three exact statements are equivalent, ...
    (comp.lang.perl.misc)
  • Re: Two mini-golfish problems
    ... here's a little problem that I'd like to propose in the Perl ... >> Given a string $x that we may assume contains no newline characters, ... Otherwise it omits the last newline for words of uneven length. ...
    (comp.lang.perl.misc)
  • Two mini-golfish problems
    ... here's a little problem that I'd like to propose in the Perl ... Given a string $x that we may assume contains no newline characters, ...
    (comp.lang.perl.misc)
  • Re: newline in arrayelement
    ... The newline that was stored in the database, ... Is there a silver bullet for this, or should I look into a replacement ... Or have PHP do that. ...
    (comp.lang.javascript)