Jump to content

[SOLVED] Get text from HTML


Norsk.Firefox

Recommended Posts

Hello,

I have some general questions:

I've got a HTML document, and I want to "extract" part of the text from it.

I want all text from within a <h4> tag, and all info from this part:

<tr>

    <td class='tabell'><a target='_top' class='print' title='Kampinformasjon' href='kamp.asp?KampId=395506'>1205</a></td>

    <td class='tabell'><a target='_top' class='print' title='Kampinformasjon' href='kamp.asp?KampId=395506'>54J1431005</a></td>

    <td class='tabell'><a target='_top' class='print' title='Kampinformasjon' href='kamp.asp?KampId=395506'>395506</a></td>

    <td class='tabell'><a target='_top' class='print' title='Anleggsinformasjon' href='anlegg.asp?AnleggId=45'>Nordby Idrettshall</a></td>

    <td class='tabell'><a target='_top' class='print' title='Lagsinfomasjon' href='organisasjon.asp?OrgId=12326'>Nordby</a></td>

    <td class='tabell'><a target='_top' class='print' title='Lagsinfomasjon' href='organisasjon.asp?OrgId=10092'>Mysen 1</a></td>

    <td nowrap class='tabell' align='center'><a target='_top' class='print' title='Kampinformasjon' href='kamp.asp?KampId=395506'> - </a></td>

    <td class='tabell' align='left'><a target='_top' class='print' title='Personinformasjon' href='person.asp?PersonId=174655'>Egidius</a> / <a target='_top' class='print' title='Personinformasjon' href='person.asp?PersonId=169892'>Nilsen</a></td>

    <td class='tabell' align='left'><a target='_top' class='print' title='Organisasjonsinformasjon' href='organisasjon.asp?OrgId=5185'>Nordby IL Håndballgruppa</a></td>

 

I want the info marked with red, and it's repeated more like that in the document, so I want it to check them all. Anyone that can make a function to fetch the info? Or give me some hints?

 

NF

Link to comment
https://forums.phpfreaks.com/topic/68079-solved-get-text-from-html/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.