21303 Posts in 5736 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 182 Views |
-
Access array elements with <% control %>

6 March 2012 at 10:05am
Hello!
Can I access the elements of an array with a <% control %> structure?
If
protected function RArray() {
return array("foo1" => "bar1", "foo2" => "bar2");
}then
<% control RArray %>
???????
<% end_control %>What should I use to access the array elements?
Thanks,
Regards,
Jose -
Re: Access array elements with <% control %>

6 March 2012 at 6:21pm
You can, but you need to wrap the array in an Array Data object.
return new ArrayData(array(
'Hi' => 'Hello'
)); -
Re: Access array elements with <% control %>

7 March 2012 at 6:35am
Hi Willr!
Yes. This works perfectly.
Thanks!!Regards,
Jose
| 182 Views | ||
|
Page:
1
|
Go to Top |


