Anybody can provide code snippet how to implement s开发者_如何学Goomething like "SEO Smart Links" does ?
Here is what it does: SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags on your blog.
So e.g. I will provide array of keywords + links, pass it to the function and function must search for those words in post and then replace them and create links.
preg_replace (click on the link to RTM) can give you what you are looking for. This is a PHP function that takes a string, looks for any given string in that string, and replaces it with another string. It has full regular expression support.
精彩评论