Posted By

Narayon on 06/19/12


Tagged

php replace String


Versions (?)

## strip_special_chars($string) [php]


 / Published in: PHP
 

replace special characters

  1. ## strip_special_chars($string) [php]
  2.  
  3. function strip_special_chars($string){
  4. $string = preg_replace('/([^.a-z0-9]+)/i', '_', $string);
  5. return $string;
  6. }

Report this snippet  

You need to login to post a comment.