yii\helpers\BaseArrayHelper::htmlDecode PHP Method

htmlDecode() public static method

Only array values will be decoded by default. If a value is an array, this method will also decode it recursively. Only string values will be decoded.
See also: http://www.php.net/manual/en/function.htmlspecialchars-decode.php
public static htmlDecode ( array $data, boolean $valuesOnly = true ) : array
$data array data to be decoded
$valuesOnly boolean whether to decode array values only. If false, both the array keys and array values will be decoded.
return array the decoded data
    public static function htmlDecode($data, $valuesOnly = true)
    {
        $d = [];
        foreach ($data as $key => $value) {
            if (!$valuesOnly && is_string($key)) {
                $key = htmlspecialchars_decode($key, ENT_QUOTES);
            }
            if (is_string($value)) {
                $d[$key] = htmlspecialchars_decode($value, ENT_QUOTES);
            } elseif (is_array($value)) {
                $d[$key] = static::htmlDecode($value);
            } else {
                $d[$key] = $value;
            }
        }
        return $d;
    }