Skip to content

Retrieve Data Inside Templates: loops #38

@plweil

Description

@plweil

Can you use helpers for echoing variables while iterating through an array? All I have been able to do is something like this:

<?php foreach ($this->news_stories as $story): ?>
  <li><?= $story['title'] ?></li>
<?php endforeach ?>

Are there any other options for doing this?I'm not sure whether this is providing an escaping or other benefits of helpers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions