php去掉文本中的空格

2010年06月19日  |  14:47分类:PHP技术  |  标签:  |  566 views

php 去掉文本中的空格,并替换为需要的字符,比如 ‘,’,可以使用下面的函数来实现:

str_replace(‘ ‘,’,',$str);  //用逗号替换空格

原创文章,转载请注明: 转载自长沙营销型网站建设,营销型网站开发,Zen-Cart | 小龙包

本文链接地址: php去掉文本中的空格

喜欢本文,那就收藏到: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

发表您的评论

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word