I think my problem is to specific the for-loop that limit the page displays into the last foreach loop. Sorry for the messy code, still a work in progress.
-----
I am working on a cgi assignment where I need to break 10 messages, limit each page to display 3 messages and the reminder (1 in this case) on the last page.
I am having trouble using arithmetic operations to divide the pages.
Leave a comment: