<?php $checked = 5;
$count = 5;
?>
<?php for($i = 1; $i <= $count; $i++): ?>
<?php if($i == $checked):?>
<input class="rating-input" id="mod<?=$i?>'" name="radio-rating" type="radio" value="<?=$i?>" checked>
<label class="rating-star" for="mod<?=$i?>" ></label>
<?php else:?>
<input class="rating-input" id="mod<?=$i?>'" name="radio-rating" type="radio" value="<?=$i?>">
<label class="rating-star" for="mod<?=$i?>" ></label>
<?php endif;?>
<?php endfor;?>
<?php
$checked = 5;
$count = 5;
for($i = 1; $i <= $count; $i++) {
$isChecked = $i == $checked ? 'checked' : '';
echo "
<input class='rating-input' id='mod{$i}' name='radio-rating' type='radio' value='{$i}' {$isChecked}>
<label class='rating-star' for='mod{$i}' ></label>
";
}
$checked = 5;
$count = 5;
$inputs = '';
for($i = 1; $i <= $count; $i++) {
$checked_attr = $i == $checked ? ' checked' : '';
$inputs .= '<input class="rating-input" id="mod' . $i . '" name="radio-rating" type="radio" value="' . $i . '"' . $checked_attr . '>';
$inputs .= '<label class="rating-star" for="mod' . $i . '" ></label>';
}
echo '
<div class="order_right">
<div class="wrap_stars">
<form class="form-rating" method="POST">
<fieldset>
<legend></legend>
<div class="rating-group" id="el_555' . $row["products_id"] . '">
' .$inputs . '
</div>
</fieldset>
<div class="count_block">
<!-- Статистика -->
<ul class="count" >рейтинг : ' . round($row["rating"], 1 ) . '</ul>
</div>
</form>
</div>
</div>
</li>
</div>
';