源字符串是my-one-day
最终想得到my one day

preg_replace方法
<?php
$string = 'my-one-day';
$pattern = '/-/i';
$replacement = '&nbsp;';
echo preg_replace($pattern, $replacement, $string);
?>