|
Posted by Paul Lautman on 08/15/06 17:15
Rik wrote:
> 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,
That's great, thanks Rik
Navigation:
[Reply to this message]
|