title = "The Art of Computer Programming"; $book0->author = "Knuth"; $book1 = new aBook(); $book1->title = "Visual Explanations"; $book1->author = "Tufte"; $book2 = new aBook(); $book2->title = "Web Style Guide"; $book2->author = "Lynch & Horton"; $allBooks = new myBooks (); $allBooks->books = array ($book0, $book1, $book2); echo json_encode($allBooks); ?>