I have this problem. I print result of my query as cicle. I nedd to concatenate to $doSet array an other array $pag that I need to print only one.
If I insert $pag in my $record array every cicle of function I print $pag value. I want see it only one.
$doSet = new DataObjectSet();
foreach($rec as $key)
Hello! I'm not sure if I understood well your problem. You want to print $pag which is a array only once in the template, so why are you placing it inside the control?. Can't you call it out of the control?.
I'm quite new to SS and PHP. But I'll try to help if I can.
Where is you variable $pag? I can't see it in your first post.
is it related with your query results?, I think yes. Because you could create another function to get this data and then call it in your template.
Or as I can see you were trying to push it inside your array. And then you could call it in you template like $Query.pagination or use it inside a control block if it is an array like <% control Query.pagination %> <% end_control %>.
If you can send me the whole code I will take a look at it.