Hi there,
I've been struggling with this for hours and I don't appear to get it sorted. I checked all my PHP books, PHP.net & Google but I simply can't figure this one out. There are only 2 possibilities:
1.I am dum
2.I am tired.
For some reason I prefer the 2nd option ๐ .
function make_links($string) {
$pattern = 'link[[:punct:]]+[a-zA-Z]+';
eregi($pattern, $string, $matches);
print count($matches)."<br />";
foreach ($matches as $current_match) {
print $current_match.'<br />';
}
}
The problem with this script is that it says it found a single match while I know there are 2 in $string.
This is the simplified version of the whole problem. The finality is having strings like %adobe๐ฎfficial Website:_parent% in the text itself and have them replaced by proper HTML links.