1

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,

0

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.