I have a PHP/MySQL program that exports user input to a Word document. The number of pages always differs based on user input and there are page/section breaks throughout the report when it prints. One section can be 1 page one week and 30 pages the next and there are roughly 12 sections for the entire report.
How do I predetermine a Table of Contents if the number of pages per section changes each week and has to be generated at the beginning of the report?