How To Clean Special Characters From PHP String

$string = üäšđčćžqwwert&_+.,/@:%();{}[]*=!?#$€|÷<>';echo preg_replace('/[^a-zA-Z0-9--]/', '', $string);

PHP FILTER_SANITIZE_URL Filter

The FILTER_SANITIZE_URL filter removes all illegal URL characters from a string.
This filter allows all letters, digits and $-_.+!*'(),{}|\^~[]`'><#%;/?:@&=

<?php$string='http://www.wnaprejåøls.coøm';var_dump(filter_var($string, FILTER_SANITIZE_URL));?>