如何在php中用图像替换文本

时间:2016-10-05 06:16:34

标签: php html

我想替换已为图像指定特定文本的变量。我要包含一张提供细节的图片。

查看我突出显示的购物车选项,我想用图片替换它:

enter image description here

2 个答案:

答案 0 :(得分:0)

//Maybe you'll only display an image is a certain condition is met? If so, then...
       if($condition == "parameter") {
           $value .= "<img src='path/to/img' alt='img' />";
       }

答案 1 :(得分:0)

您应该可以在catalog/language/mylanguage/module/cart.phpcatalog/template/module/cart.tpl中进行更改。

https://forum.opencart.com/viewtopic.php?f=5&t=1516