foreach (chastrechiRUS($tred['text']) as $key => $value) {
$tt= "['$key' => $value,'у' => 1];";
}
echo $tt;
function convert($number)
{
$digits = str_split($number);
$chars = [];
foreach ($digits as $digit) {
$chars[] = array_search($digit, $tt);
}
return implode('', $chars);
}
echo convert('8');
Warning: array_search() expects parameter 2 to be array, null given in D:\OSPanel\domains\Rubick\index.php on line 146