Re: Re: echo?

From: Date: Wed, 23 Mar 2011 03:46:21 +0000
Subject: Re: Re: echo?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-311994@lists.php.net to get a copy of this message
On Tue, Mar 22, 2011 at 10:50:54PM -0400, Jim Giner wrote: > Yes - it is J and I. I tried using $i+1 in the echo originally but it > wouldn't run. That's why I created $j. Yes, the substitution creates a syntax error unless surrounded by parentheses or the like. > And just what is wrong with the old cr/lf sequence? How would you have done > it? You're using HTML-encoded entities for 0x0d and 0x0a. You can simply use 0x0d and 0x0a instead. If you're running this in a web context, you should use "<br/>" instead of CRLF. At the command line, I'm not familiar with running PHP on Windows. In *nix environments, it's enough to use "\n", just as they do in C. It might even work in Windows; I don't know. If not, you should be able to use "\r\n". You can also try the constant PHP_EOL, which is supposed to handle newlines in a cross-platform way. Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com

« previous php.general (#311994) next »