In order to connect the iPhone to an HDMI television via a wired connection, you need an Apple Digital AV connector. One end of this connector is inserted into your iPhone, and the other has a dock for an HDMI cable connection to your television.
Apple Digital AV connectors are available directly from a variety of electronics suppliers. Purchase the correct adapter for your particular iPhone model. Third party connectors that do not require an HDMI cable are also available; these connectors insert directly into your iPhone on one end and into the HDMI port on your television on the other.