How to limit the number of blogs displayed in one page. Yii 1 , PHP

I am able to display the blogs in one page, but I want to display only 5 blogs per page and display next 5 blogs on clicking next page button and so on.

Code in view file :


<?php

if (is_array($blogArticles) && count($blogArticles) > 0):

foreach ($blogArticles as $key => $blog_article):

?>


 <h3>

<a href="#" style="color: black">

<?php print $blog_article['title']; ?>

</h3><br/>

Author : <?php print $blog_article['author']; ?>

<?php print $blog_article['published_date']; ?> 

<a href="<?php print Yii::app()->createUrl("//site/blogsingle" , array("id"=>$blog_article['id']))  ?>" class="btn btn-info" role="button">Read More</a>

Hi MukeshKoli,

Namaskar!

The following link may help you to understand the concept of pagination using Yii framework!

http://www.yiiframework.com/forum/index.php/topic/25901-pagination-solution-simple-and-complex-ways/