|
Posted by Rik on 12/17/74 11:55
Paul Lautman wrote:
> Within a subsection of an HTML document (not a complete page), there will be
> a few spans with the class "room_headings"
> e.g.
> <span class="room_headings"> Double
> Room</span>
>
> Can folks suggest some nice ways of extracting all the text contents of such
> spans into a list (for use in a drop-down select list)?
preg_match_all('|<span[^>]*?class="room_headings"[^>]*?>(.*?)</span>|si',$html,$matches,
PREG_PATTERN_ORDER);
print_r($matches[1]);
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|