【www.gdgbn.com--word】
代码如下 $num = "www.111cn.net";
$string = "this string has four words.
";
$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**********
";
$string = ereg_replace ("^", "
", $string);
$string = ereg_replace ("$", "
", $string);
echo "==========$string==========";