I've been fooling around with a bit of code lately. It's supposed to convert links like [[link]] in a text to a link like http://www.example.com/index.php?title=link or whatever. Like a Wikipedia link, really.
Here it is:
Of course, it doesn't work. The text comes out unchanged.
At the moment, $article_text is the text that is being parsed. $site_url is the url of whatever the site is.
Anyways, you're probably thinking "What was he thinking when he wrote that code?" or something like that. Well, I'm not that great at PHP. I've never had to do regex or string manipulation before, really. I'm living off of the book until I can get enough experience. And I don't have that much, at the moment.