Hello.
For "preg_replace()", what is the syntax to search for a specific 'hardcoded' URL with a query string attached contained within BBcode tags?
The url is contained in a variable AND each can be found 1 or more times within the body of the text.
I'm looking for something like this that's located in a loop:
=============
From preg_match_all(),
$result[0][$y] = "[IMG]http://www.example.xyz/attachment.php?attachmentid=46&d=1166075675[/IMG]";
$test_url_bb[$i] = $result[0][$y];
$test_url[$i] = $result[1][$y];
$search[$i] = "#$test_url[$i]#";
$replace[$i] = "<img src=\"$test_url[$i]\" border=\"0\" alt=\"" . $img_name[$i] . "\" " . " />";
(outside of loop)
$text = preg_replace($replace,$search,$text);
=============
$search[] var needs fixing b/c link is not found in preg_replace(). Note: without the '# delimiters', "Unknown modifier 'h'" error results. I'm prefer not to have to slice and dice $test_url unless necessary. But, whatever works... :o
Thanks in advance.