Classes And Objects
Lesson 29Author : GOUP
Last Updated : September, 2020
Code
class Book{
var $title;
public $author;
};
$book1 = new Book;
$book1->title = "Harry Potter";
$book1->author = "JK Rowling";
echo $book1->title."<br>";
class Book{
var $title;
public $author;
};
$book1 = new Book;
$book1->title = "Harry Potter";
$book1->author = "JK Rowling";
echo $book1->title."<br>";