<?foreach ($arResult["PROPERTIES"] as $i => $arProp):?>
<?if(!empty($arProp["VALUE"])):?>
<table id="table1">
<tr style="background-color:"<?= $i%2 ? 'green' : 'white' ?>">
// ...
#table1 tr:nth-child(even) { background: #0f0; }
#table1 tr:nth-child(odd) { background: #fff; }
var i = 12;
console.log(new String(i).length)