No, rep-whoring is not a good reason to downvote.
That said, the answers there are not particularly helpful, imho. I have no reason to doubt that the answerers honestly felt they were helping the asker, but what they are actually doing can only be described as extreme spoon-feeding. And, at least to me, that's neither helpful nor useful, the asker didn't learn anything new today, they just got a ready made solution.
Furthermore, the php tag is notorious for the vast amount of crap questions it gets, and I really hate it when people choose to answer them instead of moderating them. Answers to such crappy questions serve only one purpose, and that's to offer a (false) sense of legitimacy to the question. The asker got what he was looking for, without any effort at all. And that's... not good.
I personally wouldn't downvote, because technically they are correct answers, but at the same time the proliferation of crap in the php tag that's partly encouraged by rep-whoring answers is one of the many reasons I've given up on Stack Overflow.