That code works perfectly as well..I understand most of what I was doing wrong thanks so much for the help.
There is just one thing that I am confused about, the FOR loop. I thought it was supposed to continue until the condition was met?
This is just a test I wrote out to show the process the loop will go through:
//set counter to 0, test if counter is less than index if yes increment the counter and jump to next array.
//1st loop counter = 0, is 0 < 0 no, break loop
//2nd time 1st loop counter = 0, is 0 < 1 yes, inc counter = 1, jump to next array
//2nd time 2nd loop counter = 1, is 1 < 1 no, break loop
//3rd time 1st loop counter = 0, is 0 < 2 yes, enter loop, jump to next array
//3rd time 2nd loop counter = 1, is 1 < 2 yes, enter loop, jump to next array
By the time index reaches 2 it will need to loop twice until the condition is met. Am I looking at this wrong?
Does next($array) break the loop?
I tried to find the answer but I was unable to and I am just confused on this..any help is always appreciated.