If you know the count of the array then you can use a for loop. I happen to have the code for a for loop right in my Clipboard.
for ( $i = 0 ; $i < count($curr_items) ; $i++ )
if($i%24==0) Start a new page.
Whatever your are doing goes here.
Starts a new page every 24th item.