Answers for "twig if string"

PHP
0

twig is in string

{% if 'searchterm' in string %}
	// your code here
{% endif %}
Posted by: Guest on July-20-2021
0

test if string in string twig

{# returns true #}

{{ 1 in [1, 2, 3] }}

{{ 'cd' in 'abcde' }}
Posted by: Guest on October-05-2020

Browse Popular Code Answers by Language