0

I have array of object if I using print_r looks like :

    Array
    (
        [0] => stdClass Object
            (
                [name] => User1
                [user_id] => 1
                [email] => user1@website.com
            )

        [1] => stdClass Object
            (
                [name] => User2
                [user_id] => 2
                [email] => user2@website.com
            )

        [2] => stdClass Object
            (
                [name] => User3
                [user_id] => 3
                [email] => user3@website.com
            )
     )

I want to loop and show them using Twig Engine then access member of object like name, email using Twig Engine too. How do that? I was tried but always error. I'm new about Twig.

Ugy Astro
  • 357
  • 3
  • 6
  • 16
  • Possible duplicate of [How to access a member of an stdClass in PHP that starts with an @](http://stackoverflow.com/questions/4660291/how-to-access-a-member-of-an-stdclass-in-php-that-starts-with-an) – Yu Jiaao Apr 04 '17 at 08:20
  • 1
    @UgyAstro if you would include at least some code showing HOW you try to access them, it would be easier for others to help you. – Joris Meys Apr 04 '17 at 08:54