Sagewire Logo

Newline

2 Message(s) by 2 Author(s) originally posted in php general


From: i.am.magoo Date:   Sunday, October 28, 2007
Hi NG!

I have switched to using single quotes, and found out that newline (\n) only
works in double quotes. It looks kind of stupid using 'someString'."\n"; and
it`s kind of inconsistent using double quotes for some lines like
"someString\n";.
What`s the best way to get a consitent code?

--
Kind regards,
magoo


From: quickshiftin Date:   Sunday, October 28, 2007
------=_Part_9967_1864350.1193582618342

Content-Disposition: inline

wrote in message:
Hi NG!
I have switched to using single quotes, and found out that newline (\n)
only
works in double quotes. It looks kind of stupid using 'someString'."\n";
and
it`s kind of inconsistent using double quotes for some lines like
"someString\n";.
What`s the best way to get a consitent code?



choose the string syntax that best fits the purpose of the given string.
if a string won't have variables embedded in it, or special characters,
use
single quotes. if it'll, use double quotes.
if you've a particularly long string, with variables and special
characters
consider Heredoc.

-nathan

------=_Part_9967_1864350.1193582618342--



Next Message: SPL


Blogs related to Newline

PHP Free Chat - Joining Chat Email Notification
Note: The extra r, n and t’s should have a \ character before them to produce a carriage return, new line and tab. WordPress appears to remove the character. Make sure to modifiy the code in pfcmail.php for the To, from, ...

a basic FreeBSD server install part 2 - Apache, PHP, and MySQL
Using “o” inserts a new line after the currently selected line and starts editing mode there. If you wanted to start editing at the current position, you would press “i“. Enter the following:. AddType application/x-httpd-php .php ...

Xdebug 2.0.1
PHP 5.3 compatibility (no namespaces yet though). = Fixed bugs: - Fixed bug #301: Loading would cause SIGBUS on Solaris 10 SPARC. (Patch by Sean Chalmers) - Fixed bug #300: Xdebug does not force LTR rendering for its tables. ...

When Lord of the Rings Triology on Blu Ray? New Line...
New Line = Blu Ray correct? When can we expect Lord of the Rings in Blu Ray? I wonder how much space 20 Mbit/sec AVC + 24/48, 6.1 DD True HD x 4+ hours (extended version) takes?? Maybe it might be good to split that over 2 BD 50 discs?

php mysql client api version
... php new page php new window php newline php newline br php newline char php newline character php newline constant php newline echo php newline n php newline notepad php newline textarea php newlines php news php news cms php news ...

PhpED PHP IDE / Windows :: 5.2 Regex stored references
Thank you for implementing S&R with Regex and new-line capability. Here's one quirk, though. The regex does not seem to work with stored references. Ie search for a year followed by anything followed by a new line ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional