> -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
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
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
> -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
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
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 a nice array but when I try to implode I get the
"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
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
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
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
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
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:
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
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
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?
--
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
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
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
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 wysiwyg html editor in the cms I'm using tries to be friendly by
format
day, December 12, 2006 9:14 AM
To: php-general@lists.php.net
Subject: [PHP] Newline Before XML Document
I've read a lot of information about this error (in Firefox):
XML Parsing Error: xml declaration not at start of external entity
Basically it means that the XML did not start at the
I've read a lot of information about this error (in Firefox):
XML Parsing Error: xml declaration not at start of external entity
Basically it means that the XML did not start at the beginning of the
file. The weird part of this is that if I save the document to a file
on the webroot and th
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
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
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. Whenever I print something with a newline character in it all it
produces is a space between whatever two things I'm printing. I'm running
php 5.
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
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
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
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
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
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 double quotes, then the info from the regex is
not inserted
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
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
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..
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
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
Hey all,
I know this has been asked before, and I have tried many of the
solutions that were posted in the mailing archives, and also did some
googling. But I can't seem to eliminate some new line characters from a
string. Here is the scenario:
1. A user inputs some text into an form and sub
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
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:
TIA
-Shawn
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
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
> 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
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
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
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 for me. Another thing is \n also work. For example:
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
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
Dear All,
Firstly, I am a newbie to php so please be gentle.
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. I just get "[]" (where "[]" represents an
undisplayab
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
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
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
Morning all,
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 newline definitions to seperate
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
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
Hey guys!
I'm writing a guestbook with mysql. My probblem is that when user enter at long word
like blablablablablablablablablablablabla my html-tables gets screwed up. If someone
is just fooling around the whole page design can be destroyed. I want to know how I
can make sure that no word is l
ore 020202
Note that also \n and \r -characters are included to the array.
Cheers,
- Ville
- Original Message -
From: Jesper Blomström <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 12:31 AM
Subject: [PHP] newline in preg_split
> Hi!
>
Hi!
I have text file looking something like this:
core 010105
business 070344
core 020202
...
The textfile is a result from a database question and I am trying to parse
the file in order to retrieve each line. I have tried using the
explode()-method but I can´t get it to work with the delimite
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
> 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".
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". Ha
58 matches
Mail list logo