The below line will remove all alphanumeric characters, what I'm trying to do is remove all alphanumeric characters but replace all spaces with '-'. Will I just need to have two preg_replace statements or can it be done in the one line?
So this line:
Code:
[COLOR=#0000bb]preg_replace[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]“/[^a-zA-Z0-9\s]/”[/COLOR][COLOR=#007700], [/COLOR][COLOR=#dd0000]“”[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]$string[/COLOR][COLOR=#007700])[/COLOR]
would become:Test data's - "testing"
Test-datas-testing