$txt="Текст Текст Text Text"; $txt=str_replace(array('%','+'),array('\\x',' '),urlencode($txt)); echo $txt;