With this code I can remove all special characters from string in php:
function noSpeCha($string) {
return preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $string);
}
But I need remove those characters too:
( ) % [ ]
I dont know how proceed.