Zacząłem się uczyć programowania obiektowego. A więc tak mój problem wygląda następująco
<?php class NewsCollector { public $title; public $short; public $text; function rednerNews(){ return "{$this->title}". "{$this->short}". "{$this->text}"; } } $news = new NewsCollector(); $news->title = "Drugi News"; $news->short = "To jest Drugi News..."; $news->text = "bla bla bla";
Wydaję mi się że powinno mi to wyświetlić Drugi NewsTo jest Drugi News...bla bla bla
a zwraca mi error
Fatal error: Call to undefined method NewsCollector::renderNews()