沃梦达 / 编程问答 / php问题 / 正文

树枝中的 str_replace

str_replace in Twig(树枝中的 str_replace)

本文介绍了树枝中的 str_replace的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的树枝模板中做一个简单的 str_replace.我是新来的树枝,可能我需要添加新的过滤器或类似的东西或使用现有的.我怎样才能做到这一点?在哪里可以找到可用的过滤器列表?

I want to do a simple str_replace in my twig template. I'm new to twig and probably I need to add new filter or sth like that or to use existing. How can I do this? Where can I find list of filters available?

推荐答案

有一个替换过滤器参见 文档

There is a replace filter see documentation

这篇关于树枝中的 str_replace的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:树枝中的 str_replace

基础教程推荐