Re: [PHP] trim() white space from record set

2004-07-22 Thread David Robley
On Thu, 22 Jul 2004 05:50, Msa wrote: > aaah, simple for you.. > > I have to fit that line into the following: > > $colauthor_rsResults = "0"; > if (isset($_GET['Author'])) { > $colauthor_rsResults = (get_magic_quotes_gpc()) ? $_GET['Author'] : > addslashes($_GET['Author']); > } > > and don't

Re: [PHP] trim() white space from record set

2004-07-21 Thread msa
> > > > thanks guys...but with all of the >>>> in the message, the syntax is not > > > > coming through. > > > > > > > > I have tried adding the trim() line in several ways and it isn't > > working. > > > > can you hel

Re: [PHP] trim() white space from record set

2004-07-21 Thread Justin Patrin
> > thanks guys...but with all of the >>>> in the message, the syntax is not > > > coming through. > > > > > > I have tried adding the trim() line in several ways and it isn't > working. > > > can you help me with the exact syntax? > &

Re: [PHP] trim() white space from record set

2004-07-21 Thread melissa atchley
;Justin Patrin" <[EMAIL PROTECTED]> > > To: "John W. Holmes" <[EMAIL PROTECTED]> > > Cc: "msa" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Wednesday, July 21, 2004 1:12 PM > > Subject: Re: [PHP] trim() white space from r

Re: [PHP] trim() white space from record set

2004-07-21 Thread Justin Patrin
line in several ways and it isn't working. > can you help me with the exact syntax? > > > > - Original Message - > From: "Justin Patrin" <[EMAIL PROTECTED]> > To: "John W. Holmes" <[EMAIL PROTECTED]> > Cc: "msa" <[E

Re: [PHP] trim() white space from record set

2004-07-21 Thread melissa atchley
ROTECTED]> To: "John W. Holmes" <[EMAIL PROTECTED]> Cc: "msa" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 21, 2004 1:12 PM Subject: Re: [PHP] trim() white space from record set > On Wed, 21 Jul 2004 12:41:55 -0400, John W. Holmes > <

Re: [PHP] trim() white space from record set

2004-07-21 Thread msa
thanks for the helpthe syntax is wrong somewhereparentasis.colonsI don't know where the error is $coltitle_rsResults = "0"; if (isset($_GET['Title'])) { $_GET['title'] = trim($_GET['title']); $coltitle_rsResults = (get_magic_quotes_gpc()) ? $_GET['Title'] : addslashes($_GET['T

Re: [PHP] trim() white space from record set

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 12:41:55 -0400, John W. Holmes <[EMAIL PROTECTED]> wrote: > msa wrote: > > > I created a search form with multiple search parameters. It returns nothing > > if there is a space after their text entry or if they hit return in the text > > area. > > > > $coltitle_rsResults = "0"

Re: [PHP] trim() white space from record set

2004-07-21 Thread John W. Holmes
msa wrote: I created a search form with multiple search parameters. It returns nothing if there is a space after their text entry or if they hit return in the text area. $coltitle_rsResults = "0"; if (isset($_GET['Title'])) { $_GET['title'] = trim($_GET['title']); $coltitle_rsResults = (get_magi

Re: [PHP] trim...

2003-11-26 Thread Justin Patrin
trim also gets rid of leading spaces... Mike Ford wrote: On 26 November 2003 16:59, [EMAIL PROTECTED] contributed these pearls of wisdom: Why doesn't this work...? $body = " blurb blah happy days end of text"; $body = trim($body); $body now should output: "blurb blah\nhappy days\nend of text"

RE: [PHP] trim...

2003-11-26 Thread Dan Joseph
Hi, > > $body = " > > blurb blah > > happy days > > end of text"; > > > > $body = trim($body); > > > > $body now should output: > > "blurb blah\nhappy days\nend of text" but it > > doesn't...? does trim($body, "0x0A") fix your problem? Do you want to strip everything and leave \n in ther

RE: [PHP] trim...

2003-11-26 Thread Ford, Mike [LSS]
On 26 November 2003 16:59, [EMAIL PROTECTED] contributed these pearls of wisdom: > Why doesn't this work...? > > $body = " > blurb blah > happy days > end of text"; > > $body = trim($body); > > $body now should output: > "blurb blah\nhappy days\nend of text" but it > doesn't...? No it shouldn

RE: [PHP] trim...

2003-11-26 Thread Luis Lebron
You need to strip the newlines. str_replace("\n", " ", $body); Luis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 10:59 AM To: [EMAIL PROTECTED] Subject: [PHP] trim... Why doesn't this work...? $body = " blurb blah happy days

RE: [PHP] trim strings

2002-11-13 Thread Van Andel, Robert
You should be able to use substr(). In your case, you would do $newstring = substr($string,10); Click the link for documentation. http://www.php.net/manual/en/function.substr.php Robbert van Andel === Network Operator NW Regional Operations Center Charter Commun

Re: [PHP] trim away x > 1 number of spaces from a strin

2002-07-24 Thread Evan Nemerson
php.net/str_replace On Wednesday 24 July 2002 02:05 am, Victor Spång Arthursson wrote: > Hi! > > Could someone help me with a replace that takes all occurances of " ", > that is space more than one, and replaces them with ""…? > > Sincerely > > Victor -- Go to Heaven for the climate, Hell for

Re: [PHP] trim away x > 1 number of spaces from a strin

2002-07-24 Thread Andrey Hristov
$new = preg_replace('/[ ]{2,}/',""$old); HTH Andrey - Original Message - From: "Victor Spång Arthursson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 24, 2002 12:05 PM Subject: [PHP] trim away x > 1 number of spaces from a strin Hi! Could someone help me with a

Re: [PHP] Trim a string

2001-05-06 Thread Kyle Mathews
Thanks, that worked great. - Kyle ""Jack Dempsey"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > if you're string is a variabe $address, then > eregi("http://",$address) will tell you if they've put in the http part, and > $address = substr("$address",7);

RE: [PHP] Trim a string

2001-05-06 Thread Jason Lotito
> -Original Message- > From: Kyle Mathews [mailto:[EMAIL PROTECTED]] > Sent: Sunday, May 06, 2001 4:46 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Trim a string > > > Hello: > > I have a signup form that asks for a website address. > I don't need them to put in the http://, but I'm thin

RE: [PHP] Trim a string

2001-05-06 Thread Jack Dempsey
if you're string is a variabe $address, then eregi("http://",$address) will tell you if they've put in the http part, and $address = substr("$address",7); will slice off and store the text after the http:// you'll find lots of different ways to do this...whatever suits you, go for it... -jack -

RE: [PHP] trim string - try array/join()

2001-03-22 Thread Jeff Armstrong
AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] trim string On Wed, 21 Mar 2001 18:09:47 +0800, Wen Ni Leong ([EMAIL PROTECTED]) wrote: >I need help in this basic string function. >I query from the database by using while loop and the result in in >array. I separated them by

Re: [PHP] trim string

2001-03-21 Thread Mark Maggelet
On Wed, 21 Mar 2001 18:09:47 +0800, Wen Ni Leong ([EMAIL PROTECTED]) wrote: >I need help in this basic string function. >I query from the database by using while loop and the result in in >array. I separated them by using "," . > >I want at the end of the string to be trim off. Unfortunately I >

Re: [PHP] trim string

2001-03-21 Thread Gary Huntress
Perform the trim as part of the query: "Select rtrim(app_name) , rtrim( status) from approval_list where doc_no='6'" "Wen Ni Leong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I need help in this basic string function. > I query from the database by using

RE: [PHP] trim string

2001-03-21 Thread James Moore
> -Original Message- > From: Wen Ni Leong [mailto:[EMAIL PROTECTED]] > Sent: 21 March 2001 10:10 > To: [EMAIL PROTECTED] > Subject: [PHP] trim string > > > I need help in this basic string function. > I query from the database by using while loop and the result in in > array. I separa

Re: [PHP] trim string

2001-03-21 Thread Keith Vance
You might be able to use substr. http://www.php.net/substr K E I T H V A N C E Software Engineer n-Link Corporation On Wed, 21 Mar 2001, Wen Ni Leong wrote: > I need help in this basic string function. > I query from the database by using while loop and the result in in > array. I separated t

RE: [PHP] "Trim" an array?

2001-02-03 Thread PHPBeginner.com
a simple for($i=0; $i will do the trick Cheers, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Thomas Deliduka [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 7:32

Re: [PHP] "Trim" an array?

2001-02-02 Thread Mark Maggelet
On Fri, 02 Feb 2001 17:31:43 -0500, Thomas Deliduka ([EMAIL PROTECTED]) wrote: >I looked through the archives and couldn't find anything on this. > >I have a web form which takes 9 values to create a definition for a >table >that would have up to 9 columns. > >I made the table so that each form fi

Re: [PHP] "Trim" an array?

2001-02-02 Thread Thomas Deliduka
On 2/2/01 5:34 PM this was written: > while(list($key,$value)=each($array)){ > if(empty($value)) unset $array[$key]; > } Sweet! Thanks, that was easy. -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.com/ -- PH