Welcome to WebmasterWorld Guest from 22.214.171.124
$replace = array(
'<a href="' . check_url('$1') . '">$2</a>',
'<a href="' . check_url('$1') . '">' . check_url('$1') . '</a>',
'<img src="' . check_img('$1') . '" />',
There's the relevant area of the code, can anyone help?
The ones which aren't passed to a function (i.e. <strong>$1</strong>) are working as expected, right?
EDIT: The reason "$1" is being passed to the function is because you have it quoted. Since PHP doesn't allow variables beginning with numbers, it assumes that a $ followed by a number, in quotes, should be taken literally. If you would have passed it to the function without quotes, you would have gotten an "unexpected T_LNUMBER" error.
Even if the variable were a valid one, the quotes would still be unnecessary, since the variable is already a string.
Following that, you then replace the remaining legitimate links with <a> tags.
You could do a similar thing for img tags.