in reply to Looping issue...

I see one problem: $strain_count will always print out as 1 because you declare the variable with my inside your while loop, then set it to 0, then unconditionally increment it by 1.

Perhaps you could clarify what you mean by "arrays 4-7".

It would also be helpful if you showed the exact output you are looking for, inside "readmore" tags. Also, change your pre tags to code tags. Your tabs got lost in the translation. Re-read Writeup Formatting Tips.