PHP drop-down menu using for and foreach loops