special character remove from string (quick n dirty)


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



Copy this code and paste it in your HTML
  1. preg_replace('/[^a-z0-9]/i', '_', $string)

URL: http://ahsangill.wordpress.com/2009/12/15/php-remove-special-characters-from-a-string/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.