
<?php class book { public $Tytul; public $Autor; public $Ilosc_Stron; public $Tematyka; public function __construct($Tytul, $Autor) { $this->Tytul=$Tytul; $this->Autor->$Autor; } public function getTytul () { return $this->Tytul; } public function getAutor($Autor) { $this->Autor = $Autor; } public function getIlosc_Stron() { return $this->Ilosc_Stron; } public function getTematyka() { return $this->Tematyka; } class fantasty_book extends book { } class criminal_book extends book { } $book1 = new fantasty_book('jakis tam tytul', 'jakis tam autor'); $book2 = new criminal_book('jakis tam tutul inny', 'jakis tam inny autor'); } ?>
a błąd mi wyskakuje taki : Parse error: syntax error, unexpected 'class' (T_CLASS), expecting function (T_FUNCTION) in C:\wamp\www\php\ksiazka.php on line 39
nie wiem co z tym zrobić, proszę o pomoc ;(