remove chinese space


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //(\xc2\xa0) is the unicode of chinese space
  2. $new['content'] = preg_replace('/^[(\xc2\xa0)|\s]+/', '', $new['content']);
  3.  
  4. //the space after "|" is full-shaped space
  5. re = "[\s| ]+"

URL: http://sandacn.blog.163.com/blog/static/891102009622642066/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.