Re: Profanity Filter
| From: | Sterling Hughes | Date: | Fri, 19 Jan 2001 19:35:06 +0000 |
| Subject: | Re: Profanity Filter | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35703@lists.php.net to get a copy of this message | ||
> On Fri, 19 Jan 2001, DanO wrote:
>
> >
> > why use a DB?
> >
> > just create an array of dirty words then loop your input thru it with a
> > regex.
> >
> > DanO
> >
>
> Because a DB would probably be faster than creating an array and looping
> through it with a regex.
>
Not really, a db would be slower....
the advantage to a db is ease of storage, ease of use and improved speed for
*larger* scale applications, for an application as simple as the poster is
describing, a db would be fine, but so would a text file. I don't like
arrays, because then it requires a programmer to add dirty word...
-sterling