代码如下 | 复制代码 |
$num = 'www.111cn.net'; $string = "this string has four words. <br>"; $string = ereg_replace ('four', $num, $string); echo $string; $num = '49'; $string = "this string has four words"; $string = ereg_replace ('four', $num, $string); echo $string; $string ="测试用文字"; echo "**********$string**********<p>"; $string = ereg_replace ("^", "<br>", $string); $string = ereg_replace ("$", "<br>", $string); echo "==========$string=========="; |
时间: 2024-10-27 04:43:50