Re: [PHP] str_replace on words with an array
- From: stuttle@xxxxxxxxx (Stut)
- Date: Mon, 30 Oct 2006 17:19:47 +0000
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."
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."$"
Happy happy joy joy, oh look, the spring's broken. Doing!!
-Stut (slightly drunk, but feeling generally good about the world)
.
- Follow-Ups:
- Re: [PHP] str_replace on words with an array
- From: Ed Lazor
- Re: [PHP] str_replace on words with an array
- From: "Dotan Cohen"
- 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
- str_replace on words with an array
- Prev by Date: Re: [PHP] str_replace on words with an array
- Next by Date: Re: [PHP] Is there such a thing?
- 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):