0

I have the following array that I would like to display in Smarty:

->value = Array (2)
 0 => Array (1)
 0 => Array (4)
  SiteName => "USA"
  SanctionID => "41470"
  Program => "Men"
  Amount => "5.00"
 1 => Array (1)
  0 => Array (4)
  SiteName => "USA"
  SanctionID => "41471"
  Program => "Men"
  Amount => "5.00"

I am using two foreach loops, but am unable to get the values to display. appreciate any assistance.

{foreach from=$SXid item=Amount key=SiteName}
    {foreach from=$SXid[sxid] item=Amount key=SiteName}
        <tr>
            <td></td>
            <td>{$Amount} is {$SiteName}</td>
            <td></td>
        </tr>
    {/foreach}
{/foreach}
1

1 Answer 1

1

try

{foreach from=$SXid item="outer" key="outer"}
    {foreach from=$outer item="value" key="key"}
        <tr>
            <td></td>
            <td>{$key|escape} =&gt; {$value|escape}</td>
            <td></td>
        </tr>
    {/foreach}
{/foreach}
Sign up to request clarification or add additional context in comments.

1 Comment

ahh beginning to see.. how do i get the SiteName => array variables from this point?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.