$text = '<p>This is an example & hello world.</p>'; echo Html::decode($text); // Output:This is an example & hello world.
$texts = ['<p>This is an example.</p>', 'Hello & world!']; $texts = array_map(function($text) { return Html::decode($text); }, $texts); print_r($texts); // Output: Array ( [0] =>Package library: yii2-helpres Note: This function is useful when you need to display HTML content that has been encoded for security reasons.This is an example.
[1] => Hello & world! )