Thanks so much for the pointer. I'll play around with it this morning. My instinct is to use str_replace rather than preg_replace, do you see any problem with that?
Or since I only use it on a query resource -- 80%+ of my database is from the USDA (US Dept of Agriculture), which is in all caps and uses these horrid overlapping abbreviations -- maybe I'll try just putting up a little table in the same db and figure out a way to combine the two searches. That'd keep the buggers out of my code and give me a nice array right off.
Edit: Hmm, now you really have me stirred up. If I have the guts I may just run a search/replace on the database and solve the problem once and for all - replace the abbreviations and put it in lower case.
Quote:
Of course, if you get paid by the line of code written . . . this approach probably isn't for you
|
:dry: Well, Dickens got paid by the word (and schoolchildren have paid dearly for it ever since).