I just cant get this right.. Ive been trying to use preg_match and eregi with no success..
I have a string..
$string = 'This is a link |[url]http://www.link.com[/url]|link| and so is this |[url]http://www.link.com[/url]||'
The string is designed that between the first two '|' there will be the website url, and between the second | and the third | there will be the link text.
If no link text is provided '|link.com||' then 'link.com' will be used as the link text.
Soo.. I need to formulate a link on that string...
Anyone understand?
So from that string I should get this string...
$string = This is a link <a href="http://www.link.com">link</a> and so is this <a href="http://www.link.com">http://www.link.com</a>
As for file help.. I need PHP to get all the filenames in a directory.. Im working on this one! lol