PHP array adds keyword links to articles and automatically adds links to article content_PHP tutorial

WBOY
Release: 2016-07-21 15:21:52
Original
763 people have browsed it

Copy code The code is as follows:

$keys =array(
array('Web page 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('webpage production','/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('operation','/mon/mon.html')
);
$str = "Today is May 30, 2010. There are problems with my website. This has many problems for seo. seo is search engine optimization. I used to learn php well. Now I think jsp is 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 special effects, graphic design, personal website, Web page 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;
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324827.htmlTechArticleCopy the code as follows: ?php $keys =array( array('Web page special effects','/js_a/js .html'), array('seo','/seo/seo.html'), array('php','/phper/php.html'), array('jsp','/jsp/jsp.html '), arr...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!