[PHP] strip white space

2003-07-02 Thread Steve Buehler
I am not sure how to go about this and hope that someone can help here. I have a variable like the following: $team_name=BV Stars Black; it has two spaces between the words Stars and Black. What I am trying to do is to take this variable, check for and strip the following: 1. Leading spaces

RE: [PHP] strip white space

2003-07-02 Thread Ivo Pletikosic
would $team_name = trim(ereg_replace( +, , $team_name )); do it? -Original Message- From: Steve Buehler [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 9:50 AM To: PHP Subject: [PHP] strip white space I am not sure how to go about this and hope that someone can help here

Re: [PHP] strip white space

2003-07-02 Thread Steve Buehler
Figures, right after I emailed this, I found it after looking for over an hour. Here is the result and some people had emailed me parts of this: $team_name= BV Stars Black; wsstrip($team_name); function wsstrip($str) { $str=ereg_replace (' +', ' ', trim($str));

Re: [PHP] strip white space

2003-07-02 Thread Leif K-Brooks
Steve Buehler wrote: Another question is this. The in wsstrip($str). Does that mean that it takes the input to the function as Global and changes it Globally? I am assuming that because that is what the whole function seems to do for me. No, it means that it passes a reference to the