Been a while, but when in doubt ask the ppl here.

LOL
Here's the problem...
Converting an existing script from 1 column content to 3 column content. For script purposes I've used l, r and m to represent left, right and middle. My old script would have had this same problem, but I never used extensions for content other than html. Now that I'm using plain text content also (for ease of updating) a portion of this script is failing.
Basically, if it matches an extension further down in the list of extensions in the array and then it matches an extension further up in the array it's not setting the extension to what it should.
I'll paste the code and hopefully it will make some since...
sry for the documentation in it also. I tend to loose track of things if I don't document them.
If this matches a .txt for the $lc_ext and $rc_ext, but matches .html for $mc_ext and $t_ext then $lc_ext and $rc_ext returns the .txt extension, but the $mc_ext and $t_ext is empty, nothing defined.

If all files are .html, then all is good.
It's like if it matches an extension further down in the array first, then finds one with html at the top of the array then it won't return the .html for those. It's driving me nuts!
Anyway, this is probably long enuf.
RJ
(Afterthought to original post)
Should I use separate "for" statements for each file and extension that needs matched up? I would think it would work with one instead of 4. would become very tedius and long if I decided to go with 5 or 10 dynamic content areas on a single page where some load up as html and some load up as text and some load up as php.