i need to create categories and subcategories as
Sportscricket
sachin
hockey
Entertainment
Movies
Horror Movies
Comedy Movies
and my code is
$choices = array('sports', 'cricket' , 'hockey' , 'tennis' , 'entertainment' , 'movies' , 'horror movies' , 'comedy movies');
$mform->addElement('select', 'qcategory', get_string('qcategory', 'question'), $choices);
i dont know how to create subcategories . please help