I have an array like this:
$keywords = array( 'php', 'html', 'css' );
I have a db query to return a paragraph, which contains the keywords previously mentioned in the array.
I have a link template like this:
$linktpl = '<a href="%s" title="%s">%s</a>';
I want a simple function to scan that paragraph and on the fly, whenever it finds a keyword it converts it to a link using the link template above.
And if possible I want it to take into account singular and plural (like framework and frameworks)
and is it safe for SEO to make this automated keyword linking?
Any Ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…