You are here: Re: regular expression : {link} « PHP Programming Language « IT news, forums, messages
Re: regular expression : {link}

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация