Re: [PHP] str_replace on words with an array
- From: dotancohen@xxxxxxxxx ("Dotan Cohen")
- Date: Mon, 30 Oct 2006 23:10:56 +0200
On 30/10/06, Stut <stuttle@xxxxxxxxx> wrote:
Ed Lazor wrote:
> It looks like you guys are coming up with some cool solutions, but I
> have a question. Wasn't the original purpose of this thread to
> prevent sql injection attacks in input from user forms? If so,
> wouldn't mysql_real_escape_string be an easier solution?
Me thinkie nottie. From the OP...
"I need to remove the noise words from a search string."
Yes, that is also part of the aim.
However, until the OPer accepts that people are right when they say you
can't append strings to an array it's never going to work. Every bit of
sample code posted retains the following line of code rather than fixing
it according to several other previous posts...
"^".$noiseArray."$"
Er, so how would it be done? I've been trying for two days now with no success.
Happy happy joy joy, oh look, the spring's broken. Doing!!
Boing!!!
-Stut (slightly drunk, but feeling generally good about the world)
Dotan Cohen
http://lyricslist.com/
http://what-is-what.com/
.
- Follow-Ups:
- Re: [PHP] str_replace on words with an array
- From: Ed Lazor
- Re: [PHP] str_replace on words with an array
- From: Larry Garfield
- Re: [PHP] str_replace on words with an array
- From: Stut
- Re: [PHP] str_replace on words with an array
- References:
- str_replace on words with an array
- From: "Dotan Cohen"
- Re: [PHP] str_replace on words with an array
- From: Jochem Maas
- Re: [PHP] str_replace on words with an array
- From: Ed Lazor
- Re: [PHP] str_replace on words with an array
- From: Stut
- str_replace on words with an array
- Prev by Date: Re: [PHP] Run script every 30 seconds
- Next by Date: Re: [PHP] str_replace on words with an array
- Previous by thread: Re: [PHP] str_replace on words with an array
- Next by thread: Re: [PHP] str_replace on words with an array
- Index(es):