PHP: Array to the article plus keyword connection, like 163 article content automatically add link effect
- $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 authoring ', '/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 (' Earn money ', '/mon/mon.html '),
- Array (' Operations ', '/mon/mon.html ')
- );
- $STR = "Today is May 30, 2010, My site problems this SEO has a lot of problems, SEO is SEO, before learning php good AH now think JSP good, Css+div, Web page, Web design, web production, Web learning, Web teaching, Photoshop,flash,html,css,dreamweaver,fireworks,asp,php,jsp,asp.net, website construction, website development, web effects, graphic design, personal website, web material ";
- Echo $str, "
";
- foreach ($keys as $nkeys) {
- Print_r ($nkeys); echo "
";
- foreach ($nkeys as $join) {
- Echo ($join), "
";
- if (Strpos ($str, $nkeys [0])) {
- $str =str_replace ($nkeys [0], "". $nkeys [0]. "", $STR);
- }
- //}
- }
- Echo $str;
- ?>
Copy Code |