V
V
v_k2021-07-25 22:59:24
PHP
v_k, 2021-07-25 22:59:24

Why, when assigning a Cyrillic string to a variable, only one letter gets into the first one?

After moving to Hetzner, there was a problem with the Cyrillic alphabet.

function load_words($current_lang_array, $area, $lang_type) {
    
        require ROOT_PATH."lang/".$lang_type."/".$area.".php";
    
        foreach ($lang as $k => $v)
        {
      $current_lang_array[$k] = stripslashes($v);
      
      echo $current_lang_array[$k].">";
      echo $k.'=>'.stripslashes($v);
        }
        
        unset($lang);
    
        return $current_lang_array;

    }


echo $current_lang_array[$k].">"
Gives only one letter. It will return both the key and the whole word.

echo $k.'=>'.stripslashes($v);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question