Hello people, I use this for clean a string:
$clean = preg_replace("/[^a-zA-Z0-9\/_.;|+ -]/", '', $str);
Works good, but I need add into the regex the char '&' too, I tried to add:
$clean = preg_replace("/[^a-zA-Z0-9\/_.;&|+ -]/", '', $str);
or
$clean = preg_replace("/[^a-zA-Z0-9\/_.;\&|+ -]/", '', $str);
but this doesn't work, why? How can I do it? Big thanks.