主页
PHP
PHP str_replace() 函数
tryphp_func_string_str_replace2
运行 ❯
×
更改方向
保存代码
更改主题
Search an array for the value "RED", and then replace it with "pink".
<?php $arr = array("blue","red","green","yellow"); print_r(str_replace("red","pink",$arr,$i)); echo "
" . "Replacements: $i"; ?>