brendandonhue
08-20-2003, 10:55 AM
I have an if/else along the lines of
if(eregi("word1",$line)||eregi("word2",$line)||eregi("word3",$line)....etc
But it has hundreds and hundreds of eregis.
If I put all the words into an array, how can I do an eregi on the array instead of doing one for every single word? This would be much easier for me to maintain, as I could just keep a text file containing all the words and use file() to make it into an array.
I also have MySQL if needed, although I would prefer to do this flatfile.
Hope someone understood that-if you did, thanks in advance :)
if(eregi("word1",$line)||eregi("word2",$line)||eregi("word3",$line)....etc
But it has hundreds and hundreds of eregis.
If I put all the words into an array, how can I do an eregi on the array instead of doing one for every single word? This would be much easier for me to maintain, as I could just keep a text file containing all the words and use file() to make it into an array.
I also have MySQL if needed, although I would prefer to do this flatfile.
Hope someone understood that-if you did, thanks in advance :)