ipwnzphp Posted April 27, 2009 Share Posted April 27, 2009 Here is what is going on Another installment from the kitchen...wish I could get outside more! Spring is coming though...much more to come from the cashews-1-lb.html' target='' style='text-decoration:none; border-bottom: 1px dotted; color: red;'>outdoors soon. Enjoy the video and PLEASE SUBSCRIBE!!! Link: store/raw-food/truly-raw-wild-cashews-1-lb.html If they keyword is fount it replaces the keyword with a link. But cashew is one of my keywords so it is trying to link it. Need some help with it. Other then that it works prefect! <?php function smarty_modifier_autolink( $text ) { $pull_url = mysql_query("SELECT * FROM `jos_autolinks`"); while ($url = mysql_fetch_array($pull_url)) { $keyword = $url['phrase']; $link = $url['link']; $target = $url['target']; // modify $text with preg_replace $new_link = "<a href='$link' target='$target' style='text-decoration:none; border-bottom: 1px dotted; color: red;'>$keyword</a>"; $text = preg_replace("/$keyword/", $new_link, $text); } return $text; } ?> Link to comment https://forums.phpfreaks.com/topic/155902-link-contatins-keyword-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.