Jump to content

Extract <a> inner text in div


papaface

Recommended Posts

Hey

 

I am wondering if someone could please give me the regex to retrieve the

 

<div class="category-thumb"> <a href="/categories/php" onClick="pageTracker._trackEvent('Coding Tutorials','Click Here');"><img src="http://www.domain.com/img/phpcode.jpg" alt="PHP" /></a> <h6><a href="/categories/php" onClick="pageTracker._trackEvent('Coding Tutorials','Click Here');">PHP</a></h6><span>5 tutorials</span></div>

 

I am trying to obtain this part of the block:

>PHP</a>

There are mutliple blocks like this on the page so I am building up an array with

preg_match_all($expr,$this->html,$info,PREG_SET_ORDER);

 

Any help would be appreciated!

Link to comment
https://forums.phpfreaks.com/topic/219950-extract-inner-text-in-div/
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.