PDA

View Full Version : Help how to get information between tags



jackavin
11-05-2009, 10:05 AM
<tr>
<td class="PrintShowTimesFilm" colspan="2">A</td>
</tr>
<tr>
<td class="PrintShowTimesDay" valign="top" colspan="1">Daily</td>
<td class="PrintShowTimesSession" valign="top" colspan="1">12:10, 14:25, 17:20, 19:35, 21:50</td>
</tr>
<td class="PrintShowTimesFilm" colspan="2">B</td>
</tr>
<tr>
<td class="PrintShowTimesDay" valign="top" colspan="1">Daily</td>
<td class="PrintShowTimesSession" valign="top" colspan="1">12:10, 14:25, 17:20, 19:35, 21:50</td>
</tr>
<tr>
<td class="PrintShowTimesDay" valign="top" colspan="1">Daily</td>
<td class="PrintShowTimesSession" valign="top" colspan="1">12:10, 14:25, 17:20, 19:35, 21:50</td>
</tr>


How can i get A & B with PrintShowTimesDay,PrintShowTimesSession in order

all i can do is


$pattern = "/<td class=\"PrintShowTimesFilm\" colspan=\"2\">(.*?)<\/td>/";
preg_match_all($pattern, $r, $matches);


so i just get the name A and B but their nest information can't get it

thank you