Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch

Message Too Old, No Replies

getElementsByTagName().length problem

9:10 am on Jan 26, 2007 (gmt 0)

New User

5+ Year Member

joined:Nov 20, 2006
votes: 0

Using PHP DOM XML, I am trying to get the number of nodes in the nodelist by using the length propery of getElementsByTagName.

here's the code:
$doc = new DOMDocument();
print "$count is the length<br>";

but it doesnt give me the length, rather this is the output i get:
"Object id #2length is the length"

Can someone help me out here.
Btw im using PHP5.

Thanx in advance


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members