Classes And Objects
Lesson 29Author : 🦒
Last Updated : November, 2017
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>";