Jump to content


Photo

replace [[this]] with <a href="this">this</a>


  • Please log in to reply
2 replies to this topic

#1 koolaidman52

koolaidman52
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts

Posted 22 July 2006 - 08:14 PM

I want a user to be able to enter [[this]] into an article (for easy wikipedia style linking). The artivcle gets stored int he database. Then when someone views the article I want the server to change [[this]] into
<a href="this.php">this</a>
Any Guru's know what I might do?
Btcartoons.com --  coded entirely in Mom's basement.

#2 Joe Haley

Joe Haley
  • Members
  • PipPipPip
  • Advanced Member
  • 103 posts
  • LocationCanada, eh?

Posted 22 July 2006 - 08:29 PM

regular expressions.

http://php.net/preg_replace
and the like.
Read up on em, find some tutorials and the like.
Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime
Don't teach men to program. Teach them to fish.

Please, try the RTFM solution before asking for help:
http://php.net/manual/en/index.php

#3 koolaidman52

koolaidman52
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts

Posted 22 July 2006 - 08:49 PM

Thanks, it was a bit confusing but i figured it out form that page.
Btcartoons.com --  coded entirely in Mom's basement.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users