输入banner图图片脚本导航/分类

php中将网址转换为超链接的函数_PHP教程

代码如下:

function showtext($text){
$search = array('|(http://[^ ]+)|', '|(https://[^ ]+)|', '|(www.[^ ]+)|');
$replace = array('$1', '$1', '$1');
$text = preg_replace($search, $replace, $text);
return $text;
}

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/324307.htmlTechArticle 代码如下:

function showtext($text){ $search = array('|(http://[^ ]+)|', '|(https://[^ ]+)|', '|(www.[^ ]+)|'); $replace = array('a href="$1" target="_blank"$1/a',...