Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <HTML>
- <title> lab8 </title>
- <BODY>
- <?php
- class Books
- {
- private $title;
- private $author;
- private $price;
- function __construct ($zaglavie, $avtor, $cena )
- {
- $this->title = $zaglavie;
- $this->author = $avtor;
- $this->price = $cena;
- }
- function show_article(){
- $art = "Книга:".$this->title."," . $this->author.", ". $this->price;
- echo $art;
- }
- }
- $newb=new Books("PHP Book","Ivan Ivanov", "12lv" );
- $newb->show_article();
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment