# 替換空格和換行
$pattern = array(
'/ /',//半角下空格
'/ /',//全角下空格
'/\r\n/',//window 下換行符
'/\n/',//Linux && Unix 下換行符
);
$replace = array(' ',' ','<br />','<br />');
$sContent = preg_replace($pattern, $replace, $sContent);
# 替換空格和換行
$pattern = array(
'/ /',//半角下空格
'/ /',//全角下空格
'/\r\n/',//window 下換行符
'/\n/',//Linux && Unix 下換行符
);
$replace = array(' ',' ','<br />','<br />');
$sContent = preg_replace($pattern, $replace, $sContent);