mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-01 04:57:23 +00:00
Update replace.rst
Missing `fruits` variable declaration.
This commit is contained in:
@@ -6,6 +6,8 @@ format is free-form):
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{% set fruit = 'apples' %}
|
||||
|
||||
{{ "I like %this% and %that%."|replace({'%this%': fruit, '%that%': "oranges"}) }}
|
||||
{# if the "fruit" variable is set to "apples", #}
|
||||
{# it outputs "I like apples and oranges" #}
|
||||
|
||||
Reference in New Issue
Block a user