user1989379
user1989379

Reputation: 175

simple html dom returning string instead of array

I have the following code

$html3->find('TR[d=lt]',0);

for the following source code

<TR>
<TH NOWRAP ALIGN=RIGHT VALIGN=TOP> Date:</TH>
<TD d="lt">
  2011-05-31 </TD>
</TR>
<TR>
<TH NOWRAP ALIGN=RIGHT VALIGN=TOP>Title:</TH>
<TD d="lt">
  NETWORKS</TD>
</TR>
<TR>
<TH NOWRAP ALIGN=RIGHT VALIGN=TOP>Title:</TH>
<TD d="lt">
 Low NETWORKS</TD>
</TR>
<TR>
<TH NOWRAP ALIGN=RIGHT VALIGN=TOP>Description:</TH>
<TD d="lt">
 CD</TD>
</TR>

however the code only returns as an string the DATE instead of the an array of all the vaules,

Upvotes: 1

Views: 388

Answers (1)

Zak
Zak

Reputation: 25205

wow that's pretty sparse on your question code.

However, take a look here:

http://simplehtmldom.sourceforge.net/manual.htm#section_find

You will find that passing in the int as the second arg tells the function you are looking for a specific element. Get rid of the second arg and you should get an array of all results back.

Upvotes: 2

Related Questions