<?php class view { public function __construct($file_name) { include('template/'.$file_name); } } class controller { public $view; public function __construct() { $this->view = new view('index.phtml'); $this->view->nazwa = 'To jest moja nazwa'; } } $controller = new controller(); ?>
I chciałam wyświetlić w pliku index.phtml zmienna nazwa tak: $this->nazwa ... Co robię źle? Dopiero się ucze... Dziękuje z góry