Hi,

I may be doing this all the wrong way :) so feel free to let me know, thanks.

I've been developing a q/a database. I don' want to search on "what I consider" 
common words. Certainly there must be a list of these. Anyhow, I explode the 
question string into words and then iterate as such:


foreach($words as $Key=>$Value) {
        if($ignoreWords[strtolower($Value)]) {
                continue;
        }

Here is my $ignoreWords array:

$ignoreWords = 
array('brazil'=>1,'like'=>1,'the'=>1,'this'=>1,'that'=>1,'why'=>1,'are'=>1,'there'=>
1,'where'=>1,'find'=>1,);

What do you think? Do I just build up $ignoreWords like I'm doing or this there 
another way I've missed? Also, does someone have a list of "common words 
to ignore"?

Thanks,

Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to