RE: [PHP] newline and return issues in string

2011-10-11 Thread admin
> -Original Message- > From: Richard Quadling [mailto:rquadl...@gmail.com] > Sent: Tuesday, October 11, 2011 9:44 AM > To: ad...@buskirkgraphics.com > Cc: php-general@lists.php.net > Subject: Re: [PHP] newline and return issues in string > > On 11 October 2011 12

Re: [PHP] newline and return issues in string

2011-10-11 Thread Fatih P.
On 10/11/2011 04:44 PM, Richard Quadling wrote: On 11 October 2011 12:58, wrote: I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line expl

Re: [PHP] newline and return issues in string

2011-10-11 Thread Richard Quadling
On 11 October 2011 12:58, wrote: > I have come across an issue with my string that I would like to find a > faster way to resolve. > > It seems there are new lines and returns at different positions of the > string. > > > > First I exploded on the new line explode(“\n”, $ string) > > This gave me

RE: [PHP] newline and return issues in string

2011-10-11 Thread admin
> -Original Message- > From: Bastien Koert [mailto:phps...@gmail.com] > Sent: Tuesday, October 11, 2011 8:53 AM > To: ad...@buskirkgraphics.com > Cc: php-general@lists.php.net > Subject: Re: [PHP] newline and return issues in string > > On Tue, Oct 11, 2011 at 7:58

Re: [PHP] newline and return issues in string

2011-10-11 Thread Bastien Koert
On Tue, Oct 11, 2011 at 7:58 AM, wrote: > I have come across an issue with my string that I would like to find a > faster way to resolve. > > It seems there are new lines and returns at different positions of the > string. > > > > First I exploded on the new line explode(“\n”, $ string) > > This

Re: [PHP] Newline

2007-10-30 Thread hochprior
"Nathan Nobbe" wrote: On 10/29/07, Crayon Shin Chan <[EMAIL PROTECTED]> wrote: On Sunday 28 October 2007, magoo wrote: 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 inconsi

Re: [PHP] Newline

2007-10-29 Thread Nathan Nobbe
On 10/30/07, Crayon Shin Chan <[EMAIL PROTECTED]> wrote: > > On Monday 29 October 2007, Nathan Nobbe wrote: > > if you were going to do that you may as well use PHP_EOL > > its cross-platform and doesnt require an define directive. > > (php5 only) > > It's available in 4.3.10 as well, youre right

Re: [PHP] Newline

2007-10-29 Thread Crayon Shin Chan
On Monday 29 October 2007, Nathan Nobbe wrote: > if you were going to do that you may as well use PHP_EOL > its cross-platform and doesnt require an define directive. > (php5 only) It's available in 4.3.10 as well, but manual doesn't specify what it defines - I suppose I can echo or vardump it to

Re: [PHP] Newline

2007-10-29 Thread Jeremy Mcentire
In general, I try to think of single quotes as being literal and double quotes as being interpreted. In that case, we expect 'some line\t with a tab, a variable {$obj- >member}, and a newline\n' to produce exactly: some line\t with a tab, a variable {$obj->member}, and a newline\n Yet, the s

Re: [PHP] Newline

2007-10-29 Thread Nathan Nobbe
On 10/29/07, Crayon Shin Chan <[EMAIL PROTECTED]> wrote: > > On Sunday 28 October 2007, magoo wrote: > > > 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 usin

Re: [PHP] Newline

2007-10-29 Thread Crayon Shin Chan
On Sunday 28 October 2007, magoo wrote: > 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";. You can:

Re: [PHP] Newline

2007-10-28 Thread heavyccasey
I use echo 'Blah blah blah blah blah.'; On 10/28/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On 10/28/07, magoo <[EMAIL PROTECTED]> wrote: > > > > Hi NG! > > > > I have switched to using single quotes, and found out that newline (\n) > > only > > works in double quotes. It looks kind of stupi

Re: [PHP] Newline

2007-10-28 Thread Nathan Nobbe
On 10/28/07, magoo <[EMAIL PROTECTED]> wrote: > > 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 > "someStr

Re: [PHP] Newline and tab characters

2007-03-26 Thread Richard Lynch
On Mon, March 26, 2007 6:54 am, Arno Kuhl wrote: > I've just noticed that "\r\n" and "\t" characters create a space when > rendered in the browser (tested in IE and Firefox). I'd always thought > the > browser would ignore these characters. No. HTML "collapses" any run of whitespace to a single s

Re: [PHP] Newline and tab characters

2007-03-26 Thread Zoltán Németh
2007. 03. 26, hétfő keltezéssel 13.58-kor Zoltán Németh ezt írta: > 2007. 03. 26, hétfő keltezéssel 13.54-kor Arno Kuhl ezt írta: > > I've just noticed that "\r\n" and "\t" characters create a space when > > rendered in the browser (tested in IE and Firefox). I'd always thought the > > browser woul

Re: [PHP] Newline and tab characters

2007-03-26 Thread Zoltán Németh
2007. 03. 26, hétfő keltezéssel 13.54-kor Arno Kuhl ezt írta: > I've just noticed that "\r\n" and "\t" characters create a space when > rendered in the browser (tested in IE and Firefox). I'd always thought the > browser would ignore these characters. This wouldn't normally be a problem > but the w

RE: [PHP] Newline Before XML Document

2006-12-12 Thread Ray Hauge
I found the problem. I was re-writing the page from using the old DOMXML to the new DOM. We recently switched to PHP5, and there's only one script (so far) that creates XML, so it was easier to just use the domxml-php4-to-php5.php class that is available online. I didn't realize that there was a

Re: [PHP] Newline character problem...

2005-12-03 Thread tg-php
In addition to what was mentioned below, you can also wrap your text in tags to have it output exactly as you've formatted it: echo "\n"; echo "one\n"; echo "two\n"; echo "\n"; Actually, I don't think either of these methods is going to output what you want. Even though \n is newline, it's st

Re: [PHP] Newline character problem...

2005-12-02 Thread ?ukasz Hejnak
Robert napisal(a): I'm new to PHP but not programming in general. I have used C++ for a while and I'm familiar with the newline character as it's basically the same in PHP. This is the most basic of examples: print 'one' ; print "\n" ; print 'two' ; The output of this when accessed on my server

Re: [PHP] newline and pregreplace

2005-07-01 Thread Dotan Cohen
On 7/2/05, Richard Lynch <[EMAIL PROTECTED]> wrote: > On Fri, July 1, 2005 3:35 am, Dotan Cohen said: > > By the way, I see that you advertise offices on all the planets and > > most of the major moons, but when I try to get in contact with the > > Uranus branch, I'm told that the nearest operating

Re: [PHP] newline and pregreplace

2005-07-01 Thread Richard Lynch
On Fri, July 1, 2005 3:35 am, Dotan Cohen said: > By the way, I see that you advertise offices on all the planets and > most of the major moons, but when I try to get in contact with the > Uranus branch, I'm told that the nearest operating office is on Earth. > There's 3 planets and over 20 big moo

Re: [PHP] newline and pregreplace

2005-07-01 Thread Richard Lynch
On Fri, July 1, 2005 3:35 am, Dotan Cohen said: > By the way, I see that you advertise offices on all the planets and > most of the major moons, but when I try to get in contact with the > Uranus branch, I'm told that the nearest operating office is on Earth. > There's 3 planets and over 20 big moo

Re: [PHP] newline and pregreplace

2005-07-01 Thread Dotan Cohen
On 7/1/05, Richard Lynch <[EMAIL PROTECTED]> wrote: > On Fri, June 24, 2005 3:18 pm, Dotan Cohen said: > > I've got a line like this: > > $str=preg_replace( "-regex here-", '\n\1', $str); > > > > Which has one of two problems: If I leave the single quotes around the > > second argument, then it ret

Re: [PHP] newline and pregreplace

2005-06-30 Thread Richard Lynch
On Fri, June 24, 2005 3:18 pm, Dotan Cohen said: > I've got a line like this: > $str=preg_replace( "-regex here-", '\n\1', $str); > > Which has one of two problems: If I leave the single quotes around the > second argument, then it returns as \n and not a newline. If I change > the single quotes to

Re: [PHP] Newline charactes causing problems

2002-12-05 Thread Joshua E Minnie
I am wondering if it has something to do with the way that MySQL is storing the data. But I can't seem to find anything that is helping me when I search on MySQL related strings. +-+-+ | Joshua Minnie |Tel: 269.276.9690 | | [EMAIL PROTECTED

Re: [PHP] Newline charactes causing problems

2002-12-05 Thread John Wards
On Thursday 05 Dec 2002 3:54 pm, Joshua E Minnie wrote: > Already tried that. Doesn't seem to change anything. > how about \r John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newline charactes causing problems

2002-12-05 Thread 1LT John W. Holmes
nnie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 10:48 AM Subject: Re: [PHP] Newline charactes causing problems On Thursday 05 Dec 2002 3:48 pm, Joshua E Minnie wrote: > A load of stuff.. I just read the fist few paragraphs and got bored..

Re: [PHP] Newline charactes causing problems

2002-12-05 Thread Joshua E Minnie
Already tried that. Doesn't seem to change anything. - Original Message - From: "John Wards" <[EMAIL PROTECTED]> To: "Joshua E Minnie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 10:48 AM Subject: Re: [PHP] Newli

Re: [PHP] Newline charactes causing problems

2002-12-05 Thread John Wards
On Thursday 05 Dec 2002 3:48 pm, Joshua E Minnie wrote: > A load of stuff.. I just read the fist few paragraphs and got bored;-) but Have you tried doing a str_replace for \n which is new line? just replate it with a blank string John -- PHP General Mailing List (http://www.ph

Re: [PHP] newline in string

2002-10-13 Thread Shawn McKenzie
Thanks everyone. I'' be breaking the string after the newline so that I can convert the html to php echos and write them to a file. -Shawn "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 000d01c272c1$54d0$7c02a8c0@coconut">news:000d01c272c1$54d0$7c02a8c0@coconut... > > I have load

Re: [PHP] newline in string

2002-10-13 Thread Jason Wong
On Sunday 13 October 2002 17:24, Shawn McKenzie wrote: > I have loaded an html file into a string. How can I search the string for > newlines/linefeeds? I know they are there, because if I echo the string and > view source in the browser, some tags are on new lines. > > Example: > > > > Searc

RE: [PHP] newline in string

2002-10-13 Thread John W. Holmes
> I have loaded an html file into a string. How can I search the string for > newlines/linefeeds? I know they are there, because if I echo the string > and > view source in the browser, some tags are on new lines. > > Example: > > > > And do what when you find them? If you just want to know

Re: [PHP] newline problem

2002-07-24 Thread Justin French
A new line is NOT a or in HTML. Assuming this output is for HTML (browser) purposes, the browser will ignore newlines. second linethird line'; // works for HTML ?> Will print... this is first line second line third line ... to the browser. If you have a $string with \n's in it, you can co

Re: [PHP] newline problem

2002-07-24 Thread Jason Wong
On Thursday 25 July 2002 12:11, Wormy . wrote: > Dear all, > this sounds like a silly problem but i really dunno how to fix it! > > In the php manual on php.net said we can use an embedded newline just > by writing the string on different line by pressing "enter" key. This > doesn't work

Re: [PHP] Newline in fputs

2002-05-16 Thread Miguel Cruz
On Thu, 16 May 2002, Henry Grech-Cini wrote: > header("Content-type: Application/octet-stream"); > > The downloaded file does not contain Windows type carriage returns of > newlines! However it does contains the data thank goodness. If you want the newlines converted, then you need to use a text

Re: [PHP] Newline in fputs

2002-05-16 Thread Analysis & Solutions
On Thu, May 16, 2002 at 02:14:13PM +0100, Henry Grech-Cini wrote: > > I'm having problems with carriage returns placed in a file on a Linux based > server. When this file is download to a WindowsXP machine the carriage > returns are quite frankly useless. Unix type machines separate lines with a

Re: [PHP] Newline features and differences between php3 and php4

2002-04-18 Thread Jason Wong
On Friday 19 April 2002 04:58, Richard Archer wrote: > Note that (IMHO) the manual page for mail() is wrong. I believe the > line endings used to separate headers should be the system's native > line endings. Not "\r\n". Using "\r\n" on a Unix box can cause some > MTA's (qmail, in particular) to

Re: [PHP] Newline features and differences between php3 andphp4

2002-04-18 Thread Richard Archer
At 8:24 AM -0700 18/4/02, Chris Hall wrote: >I'm using the mail() function on a project for a client. His hosting >provider currently offers php3, meanwhile I've been developing in php4. So >far, I don't haven't found any problems other than the following: >In php4, inside the mail function I

Re: [PHP] Newline features and differences between php3 and php4

2002-04-18 Thread Miguel Cruz
On Thu, 18 Apr 2002, Chris Hall wrote: > I'm using the mail() function on a project for a client. His hosting > provider currently offers php3, meanwhile I've been developing in php4. So > far, I don't haven't found any problems other than the following: > In php4, inside the mail function I use n

Re: [PHP] Newline in a guestbook

2001-04-24 Thread Plutarck
You can also use the strlen() function. -- Plutarck Should be working on something... ...but forgot what it was. "Jimmy Bäckström" <[EMAIL PROTECTED]> wrote in message 000a01c0cd06$351f1060$[EMAIL PROTECTED]">news:000a01c0cd06$351f1060$[EMAIL PROTECTED]... Hey guys! I'm writing a guestbook wit

Re: [PHP] Newline in a guestbook

2001-04-24 Thread Henrik Hansen
Jimmy Bäckström <[EMAIL PROTECTED]> wrote: > I thought about reading the whole message into an array, and then loop through it >and for each word check whether it is larger than x chars, and if so, change it. But >couldn't that be a very memory consuming script if it should do that for every

Re: [PHP] newline in preg_split

2001-03-18 Thread Ville Mattila
Hello, If you read the file with file()-function, you can get as a result an array which includes each row of the file. For example: $rows = file("c:\thisfile.txt"); echo $rows[0]; echo $rows[1]; echo $rows[2]; The result should be now like following: core 010105 business 070344 core 020202

Re: [PHP] newline processing problem?

2001-02-11 Thread Ankur Verma
try using "\r\n" instead of a simple "\n". hope that helps Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 11, 2001 6:51 AM Subject: [PHP] newline processing problem? > > I have so

Re: [PHP] newline processing problem?

2001-02-11 Thread Richard Lynch
> I have some code which generates a large string to be used by the mail() > function. At the same point in the string each time, PHP stops processing > "\n" correctly and instead of a newline outputs nothing, so the text starts to > get run together.. but it doesn't seem to happen on every "\n".