views:

24

answers:

1

Hi In Zend_Paginator

I am trying to change one of the values of the paginator object after the database result

I loop through the paginator - get the item an then sent the rank

However this is not carrying forward to the view pagination and rank is NULL

    // Loop through the results and get the users Rank
    foreach ($paginator as $k => $v) {

        $rowSet       = $paginator->getItem($i);
        $rowSet->rank = $table->getRanking($rowSet->score);

        echo $rowSet->first_name . '<br />';
        echo $rowSet->rank . '<br />';

        $i++;
    }

    $this->view->paginator = $paginator;
A: 

That is really not the way you are supposed to use foreach loops. You do not even use $k or $v inside the foreach. link text

Iznogood