Draw a chessboard with chosen coords highlighted

<?php
echo "<table><tr><td>+</td>";
for ($letter = 1; $letter <= 8; $letter++)
{
   echo "<td>". chr($letter+64) . "</td>"; // uses PHP's CodeToChar function
}
echo "</tr>";
for ($square = 0; $square <72; $square++) // 72 is 8 rows x 9 cells (inc. labels at start)
{
   if ($square %9 == 0) // END of each row (9th cell) ... close row and start a new one
   {
     echo "</tr>\n<tr><th>".(8- intdiv($square , 9) )."</th>"; // uses PHP's DIV function
   }
   else
   {
      if ($square %2 == 1 )                         // first (odd) square is white 
      { echo "<td class='white'>&nbsp;</td>"; }
      else                                          // then flip-flop black-white-black...
      { echo "<td class='black'>&nbsp;</td>"; }
   }
}
echo "</tr></table>";
?>

+ABCDEFGH
812345678
71011121314151617
61920212223242526
52829303132333435
43738394041424344
34647484950515253
25556575859606162
16465666768697071