<?php for($charVal = ord('А');$charVal <= ord('Я'); $charVal++) { $c = chr($charVal); $c = iconv("cp1251", "UTF-8", $c); echo "<td>"; echo "<input ".($character == $c? "id='activeCharacter'" : "")." type='submit' name='character' class='characterButton' value='$c' onclick='document.forms.searchParameters.search.value=\"\"' />"; echo "</td>"; } ?>