The template parser can only handle strings or SilverStripe 'Objects' which for templates is something called 'ViewableData'. So in order to pass an array of data you need to wrap it in whats called ArrayData which will make it available to the template parser
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x','y','z'));
return new ArrayData($a);
should work. Then you can do all the template controls to access it. So you would do <% control Circle %>$a<% end_control %> etc
thank for answer. I have an other questio Would be possible that the command <% control %> don't work? I Don't see array..and I have the same problem when I copied the code to show last news, as explained in tutorial..
Because when you do $a in the template you are refering to the 'a' key in the array (as you are not passing the $a array, you are passing the contents of the $a array). So to access the other values in the template you need to do things like