Posted by gehegeradeaus on 09/12/06 11:33
mutale82@gmail.com schreef:
> gehegeradeaus@gmail.com wrote:
> > Can someone help me to make a regular expression for this sort of
> > replacement :
> >
> > text with {link:pagehref}a link{/link}.
> >
> > replace to ->
> >
> > text with <a href="pagehref">a link</a>
> >
> > I tried several things but nothing seems to work... e.g.
> >
> > $value=preg_replace("/\{link\:(.+?)\}(.+?)\{\/link\}/s","<a href=\"$1\"
> > target=\"_blank\">$2</a>",$value);
> >
> > Thanks in advance!
>
> try to use str_replace() instead...
> see it here: http://de.php.net/str_replace
I don't think I can use str_replace in this case, because it is a
dynamic tag.
Navigation:
[Reply to this message]
|