Forums

Handle array

vismay 17 Jan, 2018
Hello,

with a multiplier I manage to get the following result:

 [Model] => Array
        (
            [0] => Array
                (
                    [colore] => 01
                    [taglia] => XXS
                    [quantita] => 45
                )

            [1] => Array
                (
                    [colore] => 02
                    [taglia] => XXS
                    [quantita] => 34
                )

        )


How can I get now the list in readable form in a email?

In attachment how I set up the field name and ID.

Thanks
Max_admin 19 Jan, 2018
Answer
Hi vismay,

You will need to use a "Loop" action, set the "data provider" to {data:Model}, and enable the "return result as var", make sure the loop is before the email, then use your code in the loop body:

Color#{var:loop_name.key}: {var:loop_name.row.colore}<br>


In the email body you can now use {var:loop_name} to get the full output of the loop.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.