Prince Philip, 96, gives a wave as he leaves London hospital after hip surgery

Philip missed the royal family's Easter service just days before the surgery.

Philip underwent the planned surgery on April 4 to install a prosthetic hip to alleviate pain.

The statement continued, "His Royal Highness would like to convey his appreciation for the messages of good wishes he has received.”

Philip's daughter, Princess Anne, visited her father Thursday and said he was “on good form” after a 50-minute visit.

Queen Elizabeth, 91, speaking with well-wishers at an engagement in Windsor, said Philip was “getting on very well."

Philip had missed several events due to pain before electing to undergo the surgery.

He was absent from the royal family's Easter service attended by Queen Elizabeth and other royals, and also missed the annual Maundy Service with Queen Elizabeth at St. George's Chapel just a few days before Easter.

Andrew is taking over the role from Philip, who retired from royal duties last summer but still makes appearances with the royal family.