Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

twig last

{{ [1, 2, 3, 4]|last }}
{# outputs 4 #}

{{ { a: 1, b: 2, c: 3, d: 4 }|last }}
{# outputs 4 #}

{{ '1234'|last }}
{# outputs 4 #}
Source by twig.symfony.com #
 
PREVIOUS NEXT
Tagged: #twig
ADD COMMENT
Topic
Name
1+6 =