<td></td> tag pair three times. That's just wasteful.
Here we employ the For-Case antipattern to write a loop where we do something different on each iteration. That's a classic WTF, but here it's elevated through how unnecessary all of this really is. Plus we get the bonuses of style overrides, and the number of escaped quotes- but inconsistently and needlessly so. Take a look at the
i == 0 branch- the double quote doesn't need to be escaped, and one time it isn't.
Suffice to say, this contractor's code wasn't used, and neither was that contractor after this.
This post originally appeared on The Daily WTF.