str_replace 数组
str_replace 数组
//条件是替换与被替换数组长度必须相等
$t =array('<','>');
$e =array('<','>');
print_r ( str_replace($t,'ddd',$t));
/*
(
[0] => ddd
[1] => ddd
)
*/
print_r( str_replace($t,$e,$t) );
/*
Array
(
[0] => <
[1] => >
)
*/
//再测试字符串与数组
$t =array('<','>');
$e =array('<','>');
$str = "<a fdafdafsa fdafda";
print_r ( str_replace($t,'str_replace',$str));
// 值str_replacea fdafdafsa fdafda
// str_replace 相关文章
//
<a
href=http://www.zzzyk.com/php教程er/24/37f9965eba54b08f56ec45fe0811265b.htm>PHP
str_replace() 函数实例教程</a>
补充:Php教程,Php函数