Bob Harper was hospitalized after suffering a heart attack recently.

According to celebrity gossip site TMZ, Harper was working out in a New York gym two weeks ago when he collapsed. Fortunately, there was a doctor in the gym at the same time who was able to perform CPR and used paddles to keep him alive.

>> Read more trending stories

Harper was later taken to a hospital and claims that he was in a coma for two days. TMZ said he was hospitalized for eight days before being released and has remained in New York since the incident. His doctors have reportedly not cleared him to fly and return to his home in Los Angeles.

People reported that it confirmed the news and that he posted a photo on Instagram Wednesday with the caption, "My word of the day… LUCKY."

He told the tabloid that he is improving and, for now, his only exercise is limited walking.

The host also said that heart attacks run in his family and that his mother died from a heart attack, according to TMZ.

Harper himself confirmed the news Monday with another Instagram post of him in a hospital gown and his dog Karl.

"Well I guess you all heard what happened. Two weeks ago yesterday I had a heart attack," Harper wrote. "I am feeling better. Just taking it easy. Karl has been a great nurse. I want to thank everyone for the outpouring of messages and support. It feels good to be cared about. I've been home for 8 days now. Again, THANK YOU SO MUCH!! I'm lucky to have such good friends and family to take care of me right now."

Kelcie Willis with the Cox Media Group National Content Desk contributed to this report.