您好,欢迎访问一九零五行业门户网

小结:PHP动态网页程序两个有用的小技巧

主要是在开发或学习中的一些经验技巧进行总结,主要就是把解决某种事情更好的方法告诉大家.
1,假如你使用echo输出一个简单的语句,类似与:
那么你可以偷懒一下,写成这样:
=hello world!;?>
2,str_replace()可以使用数组进行替换,比如:
$string  = welcome to the phpchina.com ,have a good time.;
$search = array(welcome to the phpchina.com, have a good time, .);
$replace   = array(php is very good, i like it, !);
$newstring = str_replace($search, $replace, $string);
echo $string.
;
echo $newstring;
?>
大家可不要把经验都藏起来哦,^_^!
其它类似信息

推荐信息