title: What is an example of MVC in PHP?
body: <p>I'm trying to understand the MVC pattern. Here's what I think MV is: </p>
  
  <p>Model:</p>
  
  <pre><code>&lt;?php 
  if($a == 2){
      $variable = 'two';
  }
  else{
      $variable = 'not two';
  }
  $this-&gt;output-&gt;addContent($variable);
  $this-&gt;output-&gt;displayContent();
  ?&gt; 
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;?php 
  
  class output{
  
      private $content;
  
      public function addContent($var){
          $this-&gt;content =  'The variable is '.$var;
      }
  
      public function displayContent(){
          include 'header.php';
          echo $content;
          include 'footer.php';
      }
  
  }
  ?&gt;
  </code></pre>
  
  <p>Is this right? If so, what is the controller?</p>