码迷,mamicode.com
首页 > Web开发 > 详细

PHP把空格、换行符、中文逗号等替换成英文逗号的正则表达式

时间:2018-10-23 10:59:09      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:col   exp   pre   空格   \n   表达式   逗号   替换   nbsp   

$test=$_POST["test"];
$test= preg_replace("/(\n)|(\s)|(\t)|(\‘)|(‘)|(,)/" ,‘,‘ ,$test); 
$test = explode("," ,$test);

 

PHP把空格、换行符、中文逗号等替换成英文逗号的正则表达式

标签:col   exp   pre   空格   \n   表达式   逗号   替换   nbsp   

原文地址:https://www.cnblogs.com/5aiQ/p/9834819.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!