In reply to Kizi Gamer.

Off the top of my head I have no idea so I did a quick search and found the WordPress function wp_dropdown_categories, which looks like what you want.