Can someone please show me how to do this basic thing using Zend Framework MVC?
I'm looping over the timestamp data and populating my table that way. i don't understand how I would pull my presentation HTML from this loop and stick it in the view? Any help would be greatly appreciated!
<table>
<?php
  $day = date("j");
  $month = date("m");
  $year = date("Y");        
  $currentTimeStamp = strtotime("$year-$month-$day"); 
  $numDays = date("t", $currentTimeStamp); 
  $counter = 0; 
            for($i = 1; $i < $numDays+1; $i++, $counter++) 
            { 
                $timeStamp = strtotime("$year-$month-$i"); 
                if($i == 1) 
                { 
                // Workout when the first day of the month is 
                $firstDay = date("w", $timeStamp); 
                for($j = 0; $j < $firstDay; $j++, $counter++) 
                echo "<td> </td>"; 
                } 
                if($counter % 7 == 0) {
                  echo "</tr><tr>"; 
                }
                    echo "<td>" .$i . "</td>";
            }
?> 
</table>
I'm wanting to turn the above code into functions, but the HTML is throwing me off.