title: PHP MVC view looping
body: <p>I have a template for a "blog preview" - which is basically just a thumbnail, title, and short excerpt of said blog in a nice concise structure built for repetition in a list.</p>
  
  <p>As hinted above, I intend to pull the top 10 blogs on my site from the DB in my model, transfer them to the controller, which will supply them as for the view. In the view, I will need to loop through the results and populate a new "blog preview" for each blog.</p>
  
  <p>My current solution (which I think may break the rules of MVC) is to do this in the view template:</p>
  
  <pre><code>foreach($this-&gt;blogs as $blog) {
      $tpl = new Output_Html();
      $tpl-&gt;title = $blog['title'];
      // ...assign other vars
  
      $tpl-&gt;render();
  }
  </code></pre>
  
  <p>Somehow this feels like something the view shouldnt be allowed to do? But, how else would I be able to loop through the "preview" templates inside of the main page template?</p>
  
  <p>Help?</p>