title: Error in MVC of PHP
body: <pre><code>&lt;?php
  
  class Model{
      public $string;
  
      public function __construct(){
          echo "Constructor is called";
          $string = "MVC + PHP = Awesome!";
      }
  }
  
  class View{
      private $model;
      private $controller;
  
      public function __construct($controller, $model){
          $this-&gt;controller = $controller;
          $this-&gt;model = $model;
      }
  
      public function output(){
          echo  "&lt;p&gt; The string is " . $this-&gt;model-&gt;string . "&lt;/p&gt;";
      }
  }
  
  class Controller{
      public $model;
  
      public function __construct($model){
          $this-&gt;model = $model;
      }
  }
  
  
  $model = new Model();
  $controller = new Controller($model);
  $view = new View($controller, $model);
  
  $view-&gt;output();
  ?&gt;
  </code></pre>
  
  <p>I am trying to learn MVC framework in PHP. But I am facing this problem.
  The constructor of the model is called but I dont get any output of $this->model->string in "view->output".</p>
  
  <p>Thanks</p>