Reply to Re: html output lines

Your name:

Reply:


Posted by John Dunlop on 03/25/06 02:59

Justin Koivisto:

> or you could define the end of line string in a constant for easier
> modification down the road...

Good idea I reckon...

> define('CRLF',"\r\n");

That's circular. Since '\r\n' in double quotes means a CRLF pair,
define()-ing 'CRLF' as such doesn't better position you. What's worse,
if the value was to change to one or the other (i.e., to either CR or
LF, or indeed to something else) then the label 'CRLF' becomes a
misnomer.

What is useful to define(), I think, and I believe this was your
point, is not a label representing a particular 'end of line string'
but rather the end-of-line itself. (There is a predefined constant,
namely 'PHP_EOL', that would seem to stand for end-of-line, but I can't
find any documentation.)

--
Jock

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация