RaJeSh
RaJeSh

Reputation: 313

How to get the values from this array in Smarty template file?


From smarty Tpl how to retrieve the array values.

Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [ques_id] => 45
                    [optid1] => 234
                    [optid2] => 235
                    [optid3] => 236
                    [optid4] => 237
                    [optans1] => Unlimited personal and business liability
                    [optans2] => Company profits and shareholder earnings are taxed (double taxation)
                    [optans3] => Difficult to raise capital from investors
                    [optans4] => Income flows through personal tax returns
                    [optcount1] => 10
                    [optcount2] => 26
                    [optcount3] => 19
                    [optcount4] => 4
                    [answer] => 235
                    [count] => 4
                )

        )

    [1] => Array
        (
            [Difficult to raise capital from investors] => 19
            [Unlimited personal and business liability] => 10
            [Income flows through personal tax returns] => 4
        )

    [2] => Array
        (
            [Company profits and shareholder earnings are taxed (double taxation)] => 26
        )

)

here how to get the [Company profits and shareholder earnings are taxed (double taxation)] => 26 from this array in smarty.

Upvotes: 1

Views: 4499

Answers (1)

Marcin Orlowski
Marcin Orlowski

Reputation: 75619

$arrayName[0][0].optans1 should give you "Unlimited personal and business liability"

Upvotes: 1

Related Questions