Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从字符串中删除图像标记_Php_Smarty_Cs Cart - Fatal编程技术网

Php 如何从字符串中删除图像标记

Php 如何从字符串中删除图像标记,php,smarty,cs-cart,Php,Smarty,Cs Cart,我需要从描述中删除图像 我有以下代码来显示描述。这里的描述包含组合编辑器的内容。这里我只想显示1000个字符,而不是显示图像 {$row.description|substr:0:1000|cat:'..' nofilter } 我该怎么做。请帮助我。您正在使用哪个编辑器?redactor editor。我在后端有redactor编辑器。在前端,我只需要隐藏图像我解决了这个问题。通过使用{$row.description | strip|u tags | substr:0:1000 | ca

我需要从描述中删除图像

我有以下代码来显示描述。这里的描述包含组合编辑器的内容。这里我只想显示1000个字符,而不是显示图像

{$row.description|substr:0:1000|cat:'..'  nofilter }

我该怎么做。请帮助我。

您正在使用哪个编辑器?redactor editor。我在后端有redactor编辑器。在前端,我只需要隐藏图像我解决了这个问题。通过使用{$row.description | strip|u tags | substr:0:1000 | cat:“…”}这与您使用的代码相同?我使用strip|u tags而不是nofilter