Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

how to paginate merge arrays ?

Go to End

3 Posts   1105 Views


Community Member, 181 Posts

29 November 2011 at 12:48am


i have to DataObject:

$array = new DataObjectSet();

foreach(.....) {
    $produktyPodkategoria = DataObject::get(...)

$produkty = DataObject::get(...)

how to paginate $array ?

this code doesnt work

        $pageLength = 8;
        $totalSize = count($array);
        $array->getRange($SQL_start, $pageLength);
        $array->setPageLimits($SQL_start, $pageLength, $totalSize);


Forum Moderator, 1899 Posts

29 November 2011 at 3:12am


Community Member, 181 Posts

30 November 2011 at 3:00am

yes !
thank you : ]