PHP to add keyword links to the article, like 163 article content automatically add link effect
<?php
$keys =array (
Array (' Web effects ', '/js_a/js.html '),
Array (' SEO ', '/seo/seo.html '),
Array (' php ', '/phper/php.html '),
Array (' JSP ', '/jsp/jsp.html '),
array (' ASP ', '/asp/asp.html '),
Array (' ps ', '/fw/photo.html '),
Array (' Photoshop ', '/fw/photo.html '),
Array (' JavaScript ', '/js_a/js.html '),
Array ('. Net ', '/net/net.html '),
Array (' Non-mainstream ', '/fw/photo.html '),
Array (' Network ', '/mon/mon.html '),
Array (' CSS ', '/cssdiv/css.html '),
Array (' Graphic design ', '/fw/photo.html '),
Array (' website ', '/person/'),
Array (' Web making ', '/wy/yw.html '),
Array (' Search engine ', '/seo/seo.html '),
Array (' Optimization ', '/seo/seo.html '),
Array (' animation ', '/flash_a/flash.html '),
Array (' database ', '/database/database.html '),
Array (' Make money ', '/mon/mon.html '),
Array (' Operations ', '/mon/mon.html ')
);
$str = "Today is May 30, 2010, my site appears the problem of SEO there are a lot of problems, SEO is the search engine optimization, before learning php good AH now feel jsp good, Css+div, Web, web design, web production, Web learning, Web teaching, Photoshop,flash,html,css,dreamweaver,fireworks,asp,php,jsp,asp.net, website building, website development, web effects, graphic design, personal website, web material.
Echo $str, "<br>";
foreach ($keys as $nkeys) {
//print_r ($nkeys); echo "<br>";
//foreach ($nkeys as $join) {
//echo ($join), "<br>";
if (Strpos ($str, $nkeys [0])) {
$str =str_replace ($nkeys [0], "<a href=http://www.jzread.com". $nkeys [1]. "Target=_blank >". $nkeys [0]. " </a> ", $STR);
}
//}
}
Echo $str;
?>