How to use Control structures in Twig File (Drupal 8) and PHPTemplate (Drupal 7)

69

In this article, we will know How to use Control structures in Twig File  and PHPTemplate

Control structures:

Drupal 7 >>

PHPTemplate: <?php foreach ($results as $val) {} ?>

Drupal 8 >>

Twig: {% for val in results %} {% endfor %}

LEAVE A REPLY

Please enter your comment!
Please enter your name here