- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$content = '<a href="http://externalsite.com">external site</a>';
if ( ! preg_match_all( "/(<a.*>)(.*)(<\/a>)/ismU", $content, $outbound_links, PREG_SET_ORDER ) ) {
return $content;
}
var_dump( $outbound_links );