[RSS Feed/News] How foreach works?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
How can i use a xf:foreach to print an array "list style"?

I'm trying to do that:
Code:

Code:
<xf:set var="$listExample"><xf:callback class="Into\\My\\Class" method="getExampleList" params="[{$user.user_id}]"></xf:callback></xf:set>
<xf:foreach loop="$listExample" value="$example">
    Test={$example}
</xf:foreach>

Return of my callback:
Code:

return array("a" => "hey", "b" => "test");

Why foreach doesn't iterate?


ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom