Mark Sanchez filled in so seamlessly for the Philadelphia Eagles after Nick Foles was injured Sunday that at first one of his linemen didn't know there was a quarterback change.

Throwing for 202 yards and two touchdowns after Foles hurt his left shoulder late in the first quarter, Sanchez helped the Eagles beat the Houston Texans 31-21 on Sunday.

Sanchez found Jeremy Maclin deep on his first play for a 52-yard gain.

"(After) the bomb to Maclin I turned around to congratulate (Foles) and it was Sanchez," left tackle Jason Peters said. "I didn't even know the guy was out ... a lot of confidence with Sanchez, a lot of swagger."

Sanchez, who also threw two interceptions, missed all of last season after tearing the labrum in his right shoulder in the preseason. He played in the regular season for the first time since Dec. 30, 2012, with the New York Jets.

The NFC East-leading Eagles (6-2) completed the scoring with 3:50 left when Maclin grabbed a low throw for an 8-yard catch.

Sanchez said he was a bit nervous before the first throw to Maclin. Those butterflies dissolved after that strike. He said it helped that he made his NFL debut at Houston in 2009. He threw for 272 yards and a score in that win.

"That brought back a lot of good memories," he said.

Coach Chip Kelly didn't provide many details about the injury to Foles, saying only: "He's in a sling right now, and that's all I got."

Kelly was impressed with Sanchez's performance and raved about the work he puts in every week.

"I said since Day 1, 'You better have two quarterbacks in this league,'" Kelly said. "We were fortunate that when Nick did go down that we could bring Mark in. I don't think we missed a beat offensively."

Sanchez led the Jets to the AFC Championship game his first two years in the NFL, but was released by the team in March.

Being thrust into the game at a moment's notice wasn't that big of a deal to the 27-year-old.

"You just have to stay ready," he said. "You never want to get caught off guard so I was just happy I prepared well, happy I was ready and happy I could help the team."

Houston dropped to 4-5.

Things to know about the Eagles-Texans game:

RYANS INJURED: Linebacker DeMeco Ryans, who leads the Eagles with 45 tackles, was injured. He intercepted Ryan Fitzpatrick's pass in the fourth quarter, but was injured on the play and fumbled as he fell to the ground.

Ryans tore his right Achilles tendon, a person familiar with the injury said. The person spoke on condition of anonymity because the Eagles didn't release details of the injury.

HAVE MERCY: Houston outside linebacker Whitney Mercilus had a career-high nine tackles with two sacks and three quarterback hits. Mercilus lost his starting job to top overall pick to Jadeveon Clowney in training camp, but has excelled with Clowney missing seven games this season with a knee injury and an illness.

"He's played better and better every game," Houston coach Bill O'Brien said.

MARVELOUS MACLIN: Maclin had two touchdowns and 158 yards receiving after finishing with a career-high 187 yards last week in a loss at Arizona.

Maclin missed all of last season after a second ACL surgery. His 59-yard touchdown reception in the first quarter was his third TD of 50 yards or longer this season.

"When I went down last year, the one thing I told myself was to come back and give myself a chance to be better than what I was," Maclin said. "This year I have had my number called quite a bit and all I can do is be reliable for my team."

His 345 yards receiving are fourth most in a two-game span in franchise history and the most since Ben Hawkins had 347 in 1967.

DEANDRE'S BIG DAY: Houston receiver DeAndre Hopkins had six receptions for 115 yards and a touchdown for his third 100-yard game this season. Hopkins also recovered Ryans' fumble to set up his score in the fourth quarter.

MCCOY'S 100: LeSean McCoy had 117 yards rushing for his second 100-yard game and surpassed Brian Westbrook for second-most rushing yards in Eagles history with 6,095.

McCoy led the NFL with 1,607 yards rushing last season, but got off to a slow start this year before running for 349 yards in the last three games combined.

"It's weird," he said. "Every time I get 100 yards it's a big deal. I'm used to just doing it."

___

AP Pro Football Writer Rob Maaddi in Philadelphia contributed to this report.

___

AP NFL website: www.pro32.ap.org and www.twitter.com/AP_NFL