Answer the question
In order to leave comments, you need to log in
How to make text shorter?
There is this code (demonstrated below) that changes the text in Unicode and you need something new . It is
necessary that each text be transformed more briefly, the text will be written in arrays.
Now the word example = 108710881080108410771088
the problem is that Unicode is too long
here is the code that converts to Unicode you may not need it
function mb_str_split($string) {
return array_map(function ($i) use ($string) {
return mb_substr($string,$i,1,"utf-8");
}, range(0, mb_strlen($string, "utf-8")-1));
}
function incode($string) {
return array_reduce(mb_str_split($string), function($result, $e) {
$convertedString = unpack("N", mb_convert_encoding($e, "UCS-4BE", "UTF-8"));
return $result . (is_array($convertedString) ? $convertedString[1] : '');
}, "");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question