PHP array PHP array Add keyword links to the article Automatically add links to the article content

WBOY
Release: 2016-07-29 08:47:35
Original
1039 people have browsed it

Copy the 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 many 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 better, 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,webpage special effects,graphic design,personal website,webpage materials";
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;
?> ;

The above introduces the PHP array. PHP array. Add keyword links to the article. Links are automatically added to the article content, including the content of PHP array. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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