在一个单独的YML文件中,我有:
flags: [<img src="/images/cms_bo/icons/english.png" alt="English"/>]
当我把它称为我的代码时,它没有被解释,所以我使用html_entity_decode.
它有效但我在我的形象之前只有一个奇怪的字符:?
<?php echo html_entity_decode($form['lang']->render()); ?>
Run Code Online (Sandbox Code Playgroud)
我的所有文件都是UTF8编码的.你对我错过了解决这个问题的想法有所了解吗?
PS:
public static function getI18nCulturesForChoice()
{
return array_combine(self::getI18nCultures(), self::getI18nCulturesFlags());
}
Run Code Online (Sandbox Code Playgroud)