Hi,
I want to turn the following:
<ref>Name & Name2, 1999</ref>
into
<a href="index.php?ref=Name + Name2, 1999">Name & Name2, 1999</a>
I now have to following code:
$text = preg_replace("/<ref>([^<]+)<\/ref>/m","<a
href=\"index.php?ref=\\1\">\\1</a>",$text);
The problem is that &-sign are not converted to + sign. That is really
needed because & marks the end of the variable $ref
How can I improve this function so that the replacement works like I want it
to?
- Daniel