<?php echo anchor($this->lang->switch_uri($switchLang), "switch language" ?>
我想用country flag替换此switch语言消息。
如何转义字符并在该字符串消息中显示img src
<?php echo anchor($this->lang->switch_uri($switchLang), "<img src='/somepath.jpg')"; ?>
由于
答案 0 :(得分:2)
试试这个:
<?php echo anchor($this->lang->switch_uri($switchLang), "<img src=\'/somepath.jpg\'"); ?>
答案 1 :(得分:0)
使用此
echo str_replace("switch language","<img src='/somepath.jpg' />","Your string ")