how add link to a related content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

how add link to a related content

Post by srdva59 »

hi,
i have a website with some content then i need add links related for that content,
for example if i have a content called cloud and i write cloud in the text
i want a script can add a link in that word cloud that point to the content
called cloud.
how can i do this?
thanks for your help
:)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: how add link to a related content

Post by requinix »

This should be done during a "preprocessing" step because it will take long enough that you don't want to do this every time the text is being displayed.

It's basically just a matter of looping through all the words and attempting a regex replacement for each one. Can you give that a shot?
Post Reply