Confusing? yes. and I am not sure how to work it out.
I have following scenario:
3 vendors in array ([0]=>A,[1]=>B,[2]=>C)
Now I need to assign this to another array which is 5 long for each day of the week (excluding Sunday and Saturday).
So, lets say today is Wednesday then the output should be:
[Wed] => A
[Thu] => B
[Fri] => C
[Mon] => A
[Tue] => B
I can’t figure out how to achieve this. I have no code to display as its just concept and am only thinking how to do it. Tried to write code and even tried to draw it out on paper but can’t figure out an easier way to do it without having lots of if and for statements.
and yes, that array can change as we add/edit vendors. That’s why the problem. Have to go to 5 days in the array and select 5 vendors (first one repeating if less than 5).
How many weeks worth of matches do you have to generate?
How will you store the fact that the last used supplier was say, B, in order to generate the new set of matches when the first array of suppliers has to be regenerated? Is this in a text file, database?