thanks in advance
Search string and convert to html tags
Moderator: General Moderators
Search string and convert to html tags
Hi to all. I have a problem that can any one pls help me. i want to build a php code the get the string and convert it into html tags sample : [a.param=value]go to[a] to be converted to <a href="test.php?param=value">go to</a> . My problem is how may i get the "[a.param=value]go to[a]" and what if it has many strings like this to be converted.. Please if has any one has a idea help me
thanks in advance
thanks in advance
Re: Search string and convert to html tags
For that specific template
If it isn't what you want, give more examples or a more detailed explanation.
Code: Select all
preg_replace('/\[a\.([^=]+)=([^\]]+)\](.*?)\[a\]/i', '<a href="test.php?\1=\2">\3</a>', $string);