<h2>Create new list</h2> <form method="post"> <input name="name" type="text"> <input type="submit" name="createList" value="Submit" class="btn btn-success"> </form> <br> <h1>My Lists</h1> <?php // küsid kõik kasutaja listid $array_of_user_lists = $Series->getUserLists(); foreach ($array_of_user_lists as $list) { echo "<h2>" . $list->name . "</h2>"; $episodes_in_single_list = $Series->getEpisodesInList($list->id); foreach ($episodes_in_single_list as $episode) { echo "<p>" . $episode->title . " Season " . $episode->season . "</p>"; } } // iga listi kohta küsid episoodid mis seal sees on ?> </div> </div>