Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

twig if ternary check

{{ foo ?: 'no' }} is the same as {{ foo ? foo : 'no' }}
{{ foo ? 'yes' }} is the same as {{ foo ? 'yes' : '' }}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #twig #ternary #check
ADD COMMENT
Topic
Name
7+8 =