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
> > > > 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
> > 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?
> &
;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
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
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
> <
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
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"
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
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"
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
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
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
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
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
$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
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);
> -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
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
-
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
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
>
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
> -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
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
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
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
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
27 matches
Mail list logo