How did delhi get its name?

There are a number of legends associated with the origin of the name Delhi. One is that it is derived from Dhillu or Dilu, a king of Mauryan dynasty who built a city at this location in 50 BC and named it after himself.[6][13][14] Another legend holds that the name of the city is based on the Hindi/Prakrit word dhili (loose) and that it was used by the Tomaras to refer to the city because the Iron Pillar of Delhi had a weak foundation and had to be moved.[14] The coins in circulation in the region under the Tomaras were called dehliwal.[15] According to the Bhavishya Purana, King Prithviraj Chauhan, of Indraprastha built a new fort in the modern-day Purana Qila area for the convenience of all four castes in his kingdom. He ordered the construction of a gateway to the fort and later named the fort dehali.[16] Some historians believe that the name is derived from Dilli, a corruption of dehleez or dehali-both terms meaning 'threshold' or 'gateway'- and symbolic of the city as a gateway to the Gangetic Plain.[17][18] Another theory suggests that the city's original name was Dhillika.[19]
SOurce Wikipedia