<div class="row">
<div class="col-md-4 col-xs-4">
<div class="col-md-10 item">1</div>
<div class="col-md-2"></div>
</div>
<div class="col-md-4 col-xs-4">
<div class="col-md-1"></div>
<div class="col-md-10 item">2</div>
<div class="col-md-1"></div>
</div>
<div class="col-md-4 col-xs-4">
<div class="col-md-2"></div>
<div class="col-md-10 item">3</div>
</div>
</div>
<?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;?>
$link = mysql_connect("localhost", "mysql_user", "mysql_password");
mysql_select_db("database", $link);
$result = mysql_query("SELECT * FROM table1", $link);
$num_rows = mysql_num_rows($result);
public function actionIndex()
{
//$posts = Post::find()->all();
$query = Post::find();
$pages = new Pagination(['totalCount' => $query->count()]);
$posts = $query->offset($pages->offset)
->limit($pages->limit)
->all();
return $this->render('index', compact('posts', 'pages'));
}