Francesco
unread,Nov 24, 2009, 10:36:04 PM11/24/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to phpQuery
Hi, I use jQuery very much and now that I've discovered this class I
like this too, thanks for developing it :)
I'm trying to access content of some links, one by one, but it seems
I'm not managing to do it right. Example html:
..
<ul>
<li><a href="#1">title 1</a></li>
<li><a href="#2">title 2</a></li>
<li><a href="#3">title 3</a></li>
</ul>
..
Using pq("ul li a") will dump "title 1 title 2 title 3"
I need to access title x one by one. I tried:
foreach(pq("ul li a") as $elem)
print $elem->html()
But it didn't work, because $elem is a DOMElement and I didn't find a
method for doing such a basic thing. Are there any workaround?
Thanks very much :)