Bluehost.com Web Hosting $6.95

replace a chunk peace of string

This is a discussion on replace a chunk peace of string within the PHP General forums, part of the PHP Programming Forums category; Hi, After ahavuing inseted my vvalues from a local file via : load infile ... I notice a strange peace of string ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-01-2003
Ada
 
Posts: n/a
Default replace a chunk peace of string

Hi,

After ahavuing inseted my vvalues from a local file via : load infile ...
I notice a strange peace of string in my fnal field :
like :
"kkv850
"
select hex("kkv850
")
->
6B6B763835300D0A
select hex("a
")
->
610D0A
always 0D0A at the ends :(

I' m on windows, and i didn't manage to destroy this peace of string :(
trim() doesn't work ...

Thanks.
Reply With Quote
  #2 (permalink)  
Old 12-01-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] replace a chunk peace of string

* Thus wrote ada (david_devidal@yahoo.fr):
> select hex("a
> ")
> ->
> 610D0A
> always 0D0A at the ends :(
>
> I' m on windows, and i didn't manage to destroy this peace of string :(
> trim() doesn't work ...


What do you mean trim() doesn't work?


Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
Reply With Quote
  #3 (permalink)  
Old 12-01-2003
Ada
 
Posts: n/a
Default Re: [PHP] replace a chunk peace of string

> What do you mean trim() doesn't work?

trim is a basic function that remove spaces on the left and the right at the
string :
" abc "->"abc"
Reply With Quote
  #4 (permalink)  
Old 12-01-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] replace a chunk peace of string

* Thus wrote ada (david_devidal@yahoo.fr):
> > What do you mean trim() doesn't work?

>
> trim is a basic function that remove spaces on the left and the right at the
> string :
> " abc "->"abc"


trim() removes more than spaces, please read:
http://php.net/trim


What I meant in my original post was how are you using trim() that
doesn't make it work? trim() *will* fix your problem.


Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0