I want print on screen variable content of this:
$this->texto("Hello");
(in this case, Hello) I'm trying learn about MVC, but don't know how send variables and print it.
I have this controller:
class Lang extends Controller
{
public $variable;
function __construct()
{
parent::__construct();
$this->view->texto = [];
}
function render()
{
/*
* $langs = $this->model->get($string);
* $this->view->texto = $langs;
* $this->view->render('lang/index');
*/
echo $variable;
}
}
And no good results, how fix it?