<?php class komentarz { var $text; var $data; var $login; function add_com($text, $data, $login) { $this->text = $text; $this->data = $data; $this->login = $login; } function get_com() { return $this->text; return $this->data; return $this->login; } } $text = 'Fajny skrypt<br />Polecam'; $login = 'Lirdoner'; $kom = new komentarz; $kom->add_com($text, $data, $login); ?>
Na ekranie pojawia się tylko $text
Co zrobić aby wyświetlał się wszystkie dane