You may need it when you code an user authentication script and want to prevent the user to hack it with ascii injection.
$new_string content will be: Hi I am a string and I need to be stripped without any coma or stop.
- $string_to_be_stripped = "Hi, I am a string and I need to be stripped...";
- $new_string = ereg_replace("[^A-Za-z0-9]", "", $string_to_be_stripped );
You need to login to post a comment.