What class are you using for the $html->find? Not sure how this method is supposed to work. What does find return? What are the allowed parameters? In what format are the parameters?
diafol
Keep Smiling
10,838 posts since Oct 2006
Reputation Points: 1,675
Solved Threads: 1,534
Skill Endorsements: 61
You tested with what ? This one ?
$html->find('$html->find('#divid');');
$html->find('div[id=divid]');
Does it correct use ? In my opinion, your class wont' work while it is quoting, the first line. Furthermore, why the class is inside the same class as parameter.
Perhaps, you would not probably well read the instruction. I don't know what that snippet would suppose which function.
ko ko
Practically a Master Poster
673 posts since Jan 2009
Reputation Points: 120
Solved Threads: 152
Skill Endorsements: 1
Perhaps try:
$html->find('#divid');
twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5
diafol
Keep Smiling
10,838 posts since Oct 2006
Reputation Points: 1,675
Solved Threads: 1,534
Skill Endorsements: 61
Yes, but looking at the source, that's just a wrapper of:
$html->find('#div1', 0);
Where the 0 makes it return the first one (I think, which seems useless to me, but they also included a getElementsById function, which returns all elements with the ID. Go figure).
twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5
Change one of the quote pairs tot double quotes.
twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5
Do as @twiss said, or escape it.
$result = $xml->xpath('div[@id=\'player\']');
ko ko
Practically a Master Poster
673 posts since Jan 2009
Reputation Points: 120
Solved Threads: 152
Skill Endorsements: 1
It needs an = in between.
twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5