I don't really feel qualified to comment on the comparison, since I don't write php and only occasionally have a reason to read it. But I will say I don't know why there is this general sense that python is elegant. Before I mini-rant, let me say I've been using it more or less exclusively for a few months now, and have been trying to immerse myself as much as possible in the community of python developers. I've seen this comment about python's supposed elegance before.
Personally I don't see it. That doesn't mean I don't like using it. It's interpreted, accessible, fast-enough for most things, has tons of libraries, has good frameworks, is considered a "real" language, runs on almost anything, etc. Those are all great attributes. It's fun to develop in python.
Python also has some really compact, pretty elegant tools for manipulating lists, sets, and dictionaries, which also covers strings, arrays, and just about any other kind of object consisting of an ordered or unordered collection of things. It's arguably the language's major strong point. I happen to like list comprehensions, and I think doing new_list = [somefunc(a) for a in set_of_a] is as readable a way of expressing the intent of the statement as in any language I've used. Certainly more so than C#s LINQ-ey approach, with its lambdas and anonymous methods.
That said, the language itself is far from elegant, and a full list of why I hold that opinion is probably too much for this post. But that list would at least include reliance on block indenting, lack of real encapsulation (and the related evil of data hiding by convention), having to explicitly declare the self reference on a member, having to explicitly de-reference class members in class scope, having a convention for methods like __init__ and __new__ and __cmp__ rather than having a rational object hierarchy with a base interface, the reliance on convention to separate the declarative syntax for sets and dicts... messy.
The inelegance extends to the standard modules as well: having at least three ways to format strings, unicode support that only works reliably on Tuesdays, the whole disaster of the 2.x to 3.x migration.
None of this has a hill of beans to do with the language's utility for real projects, but if we're going to use words like "elegant" to apply to programming languages then they ought to have some aesthetic quality behind them, and I just don't think python rates very high in my own personal aesthetic scale. Of all the languages I've used the most "elegant" by far, in its entirety, is C#. Python isn't even close.