(2 апр 2017, 00:45) (
0/
0)
[
0]
Держи
<?php
function text($var){
$var = trim($var);
$var=htmlentities($var, ENT_QUOTES, 'UTF-8');
$var = strtr($var, array(
chr(0)=> '',
chr(1)=> '',
chr(2)=> '',
chr(3)=> '',
chr(4)=> '',
chr(5)=> '',
chr(6)=> '',
chr(7)=> '',
chr(8)=> '',
chr(9)=> '',
chr(10)=> '',
chr(11)=> '',
chr(12)=> '',
chr(13)=> '',
chr(14)=> '',
chr(15)=> '',
chr(16)=> '',
chr(17)=> '',
chr(18)=> '',
chr(19)=> '',
chr(20)=> '',
chr(21)=> '',
chr(22)=> '',
chr(23)=> '',
chr(24)=> '',
chr(25)=> '',
chr(26)=> '',
chr(27)=> '',
chr(28)=> '',
chr(29)=> '',
chr(30)=> '',
chr(31)=> ''
));
$var = str_replace("0", "", $var);
$var = str_replace('$', '$$', $var);
$var = addcslashes($var, '_%');
$var = iconv('utf-8', 'windows-1251', $var);
$var = iconv('windows-1251', 'utf-8', $var);
return $var;
}
?>