PHP :: remove special characters from a string

15 12 2009

This could be just a quick and easy help for someone who is wishing to remove special characters from some string OR wishing to just keep alpha numeric characters in the string. So here is the Regular expression for that:

preg_replace('/[^a-z0-9]/i', '_', $string)








Follow

Get every new post delivered to your Inbox.