Tuesday, 27 August 2013

Best way to extract lines from a php variables

Best way to extract lines from a php variables

What's the best way to extract lines from a php variable?
This php variable contains HTML code from cURL.
The lines are those:
<tr class="tr1"><td align="right">1.</td><td align="left"><input
type="hidden" name="now[8116632]" value="98" />
<tr class="tr2"><td align="right">2.</td><td align="left"><input
type="hidden" name="now[8121292]" value="90" />
The class of the lines is always "tr1" and tr2", also the lines are 199 to
208 :/
I try with XPath query('//*[@class="tr1"]'), i get 5 elements but i don't
know how to print those elements. How can i do that?
Thanks in advance

No comments:

Post a Comment