Can some one explain this to me ?
I know this is parsing the line:Code:$rg_link_http = "h(ttps?://" . $rg_url . ")"; $CON = preg_replace('#\[([^\]]+)\|' . $rg_link_http . '\]#U', '<a href="xx$2" class="url">$1</a>', $CON);
to html code :Code:[Google|http://www.google.com]
But what if I want to add another variable so that if it exists, it will add it to the variable ?Code:<p><a href="http://lionwiki.0o.cz" class="url">LionWiki</a> </p>
So, if I wanted the to give
It will make the link like this:Code:[Google|http://www.google.com|onMouseover="ddrivetip('Visit this google page')"; onMouseout="hideddrivetip()]
as you can see it just added the third variable parsed by | to the href tag.Code:<a href="www.google.com" onMouseover="ddrivetip('Visit this google page')"; onMouseout="hideddrivetip()">Search Engine</a>
It can be done with just one line but I dont know how - Please help![]()



Reply With Quote
Bookmarks