Jump to content

Regex for links of a specific class


Wolphie

Recommended Posts

You would be better off doing this using the DOM. I have an example on my site: http://www.jaygilford.com/php/php-dom-get-all-pagelinks/

You would just add an if to the foreach to check if

$link->getAttribute('class') == 'class_name_here'

before adding the link to the array

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.