I pray that my question isn't confusing. I have made a search engine where people can search the city and state like so "Atlanta, GA" What I want is no matter how they type it whether it's like Atlanta,GA or Atlanta GA or Atlanta, GA it will still find the results. Now I tried doing this with PHP STR and I don't know if this is right. Here is my code. Thanks.
$userinput=$request->input('cityandstate');
$stq=str_replace(",",", ", $userinput);