So lets say I have any array, $matches, inside $matches are 100 arrays with 10 elements each... Now, if i wanted to say for each sub-array swap element 5 and 6... Whats the easiest way to do that without going overboard?
A simple [man]foreach/man loop?
foreach($matches as &$match) { $temp = $match[5]; $match[5] = $match[6]; $match[6] = $temp; }
yea... that's about as clean as it gets... much ablidged =)