{% set name = 'John Doe' %}Welcome, {{ name }}!
{% if age >= 18 %}You are old enough to vote!
{% else %}Sorry, you must be 18 or older to vote.
{% endif %}
{% for post in posts %}This code loops through an array of "posts" and displays the title and content of each post. Twig is a package library developed by Symfony that provides a clean, intuitive syntax and robust feature set for building templates in PHP.{{ post.title }}
{{ post.content }}
{% endfor %}